diff --git a/tests/scenarios/cmd/cut/help/help_flag.yaml b/tests/scenarios/cmd/cut/help/help_flag.yaml new file mode 100644 index 00000000..e304cd40 --- /dev/null +++ b/tests/scenarios/cmd/cut/help/help_flag.yaml @@ -0,0 +1,10 @@ +description: cut --help prints usage to stdout and exits 0. +# skip: rshell builtin help output differs from GNU coreutils +skip_assert_against_bash: true +input: + script: |+ + cut --help +expect: + stdout_contains: ["Usage: cut"] + stderr: "" + exit_code: 0 diff --git a/tests/scenarios/cmd/echo/help/help_flag.yaml b/tests/scenarios/cmd/echo/help/help_flag.yaml new file mode 100644 index 00000000..0b776925 --- /dev/null +++ b/tests/scenarios/cmd/echo/help/help_flag.yaml @@ -0,0 +1,9 @@ +description: echo --help is not recognised as a flag and is printed as literal text. +input: + script: |+ + echo --help +expect: + stdout: |+ + --help + stderr: "" + exit_code: 0 diff --git a/tests/scenarios/cmd/head/help/help_flag.yaml b/tests/scenarios/cmd/head/help/help_flag.yaml new file mode 100644 index 00000000..d2ccd94e --- /dev/null +++ b/tests/scenarios/cmd/head/help/help_flag.yaml @@ -0,0 +1,10 @@ +description: head --help prints usage to stdout and exits 0. +# skip: rshell builtin help output differs from GNU coreutils +skip_assert_against_bash: true +input: + script: |+ + head --help +expect: + stdout_contains: ["Usage: head"] + stderr: "" + exit_code: 0 diff --git a/tests/scenarios/cmd/head/help/short_help_flag.yaml b/tests/scenarios/cmd/head/help/short_help_flag.yaml new file mode 100644 index 00000000..d128ac81 --- /dev/null +++ b/tests/scenarios/cmd/head/help/short_help_flag.yaml @@ -0,0 +1,10 @@ +description: head -h prints usage to stdout and exits 0. +# skip: rshell builtin help output differs from GNU coreutils +skip_assert_against_bash: true +input: + script: |+ + head -h +expect: + stdout_contains: ["Usage: head"] + stderr: "" + exit_code: 0 diff --git a/tests/scenarios/cmd/printf/help/help_flag.yaml b/tests/scenarios/cmd/printf/help/help_flag.yaml new file mode 100644 index 00000000..5857e3c5 --- /dev/null +++ b/tests/scenarios/cmd/printf/help/help_flag.yaml @@ -0,0 +1,10 @@ +description: printf --help prints usage to stdout and exits 2. +# skip: rshell builtin help output differs from GNU coreutils; also uses exit 2 +skip_assert_against_bash: true +input: + script: |+ + printf --help +expect: + stdout_contains: ["printf: usage: printf"] + stderr: "" + exit_code: 2 diff --git a/tests/scenarios/cmd/sed/help/help_flag.yaml b/tests/scenarios/cmd/sed/help/help_flag.yaml new file mode 100644 index 00000000..fd3fee7e --- /dev/null +++ b/tests/scenarios/cmd/sed/help/help_flag.yaml @@ -0,0 +1,10 @@ +description: sed --help prints usage to stdout and exits 0. +# skip: rshell builtin help output differs from GNU coreutils +skip_assert_against_bash: true +input: + script: |+ + sed --help +expect: + stdout_contains: ["Usage: sed"] + stderr: "" + exit_code: 0 diff --git a/tests/scenarios/cmd/sed/help/short_help_flag.yaml b/tests/scenarios/cmd/sed/help/short_help_flag.yaml new file mode 100644 index 00000000..962e0e4a --- /dev/null +++ b/tests/scenarios/cmd/sed/help/short_help_flag.yaml @@ -0,0 +1,10 @@ +description: sed -h prints usage to stdout and exits 0. +# skip: rshell builtin help output differs from GNU coreutils +skip_assert_against_bash: true +input: + script: |+ + sed -h +expect: + stdout_contains: ["Usage: sed"] + stderr: "" + exit_code: 0 diff --git a/tests/scenarios/cmd/sort/help/help_flag.yaml b/tests/scenarios/cmd/sort/help/help_flag.yaml new file mode 100644 index 00000000..2ff23c1e --- /dev/null +++ b/tests/scenarios/cmd/sort/help/help_flag.yaml @@ -0,0 +1,10 @@ +description: sort --help prints usage to stdout and exits 0. +# skip: rshell builtin help output differs from GNU coreutils +skip_assert_against_bash: true +input: + script: |+ + sort --help +expect: + stdout_contains: ["Usage: sort"] + stderr: "" + exit_code: 0 diff --git a/tests/scenarios/cmd/sort/help/short_help_flag.yaml b/tests/scenarios/cmd/sort/help/short_help_flag.yaml new file mode 100644 index 00000000..e92cc022 --- /dev/null +++ b/tests/scenarios/cmd/sort/help/short_help_flag.yaml @@ -0,0 +1,10 @@ +description: sort -h prints usage to stdout and exits 0. +# skip: rshell builtin help output differs from GNU coreutils +skip_assert_against_bash: true +input: + script: |+ + sort -h +expect: + stdout_contains: ["Usage: sort"] + stderr: "" + exit_code: 0 diff --git a/tests/scenarios/cmd/tail/help/help_flag.yaml b/tests/scenarios/cmd/tail/help/help_flag.yaml new file mode 100644 index 00000000..8d4151c1 --- /dev/null +++ b/tests/scenarios/cmd/tail/help/help_flag.yaml @@ -0,0 +1,10 @@ +description: tail --help prints usage to stdout and exits 0. +# skip: rshell builtin help output differs from GNU coreutils +skip_assert_against_bash: true +input: + script: |+ + tail --help +expect: + stdout_contains: ["Usage: tail"] + stderr: "" + exit_code: 0 diff --git a/tests/scenarios/cmd/tail/help/short_help_flag.yaml b/tests/scenarios/cmd/tail/help/short_help_flag.yaml new file mode 100644 index 00000000..92360858 --- /dev/null +++ b/tests/scenarios/cmd/tail/help/short_help_flag.yaml @@ -0,0 +1,10 @@ +description: tail -h prints usage to stdout and exits 0. +# skip: rshell builtin help output differs from GNU coreutils +skip_assert_against_bash: true +input: + script: |+ + tail -h +expect: + stdout_contains: ["Usage: tail"] + stderr: "" + exit_code: 0 diff --git a/tests/scenarios/cmd/wc/help/help_flag.yaml b/tests/scenarios/cmd/wc/help/help_flag.yaml new file mode 100644 index 00000000..2ac0cfb0 --- /dev/null +++ b/tests/scenarios/cmd/wc/help/help_flag.yaml @@ -0,0 +1,10 @@ +description: wc --help prints usage to stdout and exits 0. +# skip: rshell builtin help output differs from GNU coreutils +skip_assert_against_bash: true +input: + script: |+ + wc --help +expect: + stdout_contains: ["Usage: wc"] + stderr: "" + exit_code: 0