mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-22 20:32:05 +01:00
Rename test and reference exit codes directly
This commit is contained in:
parent
53df487e59
commit
a3b2070e76
2 changed files with 4 additions and 3 deletions
|
@ -7,17 +7,18 @@ package org.pgpainless.cli;
|
||||||
import com.ginsberg.junit.exit.ExpectSystemExitWithStatus;
|
import com.ginsberg.junit.exit.ExpectSystemExitWithStatus;
|
||||||
import com.ginsberg.junit.exit.FailOnSystemExit;
|
import com.ginsberg.junit.exit.FailOnSystemExit;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import sop.exception.SOPGPException;
|
||||||
|
|
||||||
public class ExitCodeTest {
|
public class ExitCodeTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ExpectSystemExitWithStatus(69)
|
@ExpectSystemExitWithStatus(SOPGPException.UnsupportedSubcommand.EXIT_CODE)
|
||||||
public void testUnknownCommand_69() {
|
public void testUnknownCommand_69() {
|
||||||
PGPainlessCLI.main(new String[] {"generate-kex"});
|
PGPainlessCLI.main(new String[] {"generate-kex"});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ExpectSystemExitWithStatus(37)
|
@ExpectSystemExitWithStatus(SOPGPException.UnsupportedOption.EXIT_CODE)
|
||||||
public void testCommandWithUnknownOption_37() {
|
public void testCommandWithUnknownOption_37() {
|
||||||
PGPainlessCLI.main(new String[] {"generate-key", "-k", "\"k is unknown\""});
|
PGPainlessCLI.main(new String[] {"generate-key", "-k", "\"k is unknown\""});
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ import org.pgpainless.cli.PGPainlessCLI;
|
||||||
import org.pgpainless.cli.TestUtils;
|
import org.pgpainless.cli.TestUtils;
|
||||||
import sop.exception.SOPGPException;
|
import sop.exception.SOPGPException;
|
||||||
|
|
||||||
public class DetachInbandSignatureAndMessageTest {
|
public class InlineDetachTest {
|
||||||
|
|
||||||
private PrintStream originalSout;
|
private PrintStream originalSout;
|
||||||
private static File tempDir;
|
private static File tempDir;
|
Loading…
Reference in a new issue