diff --git a/tests/__fish_contains_opt.err b/tests/__fish_contains_opt.err deleted file mode 100644 index 2c92086df..000000000 --- a/tests/__fish_contains_opt.err +++ /dev/null @@ -1 +0,0 @@ -__fish_contains_opt: Unknown option -x diff --git a/tests/__fish_contains_opt.in b/tests/__fish_contains_opt.in deleted file mode 100644 index 38598ecee..000000000 --- a/tests/__fish_contains_opt.in +++ /dev/null @@ -1,52 +0,0 @@ -function commandline - if test $argv[1] = '-ct' - echo --long4\n-4 - else if test $argv[1] = '-cpo' - echo cmd\n-z\n-bc\n--long1\narg1\n-d\narg2\n--long2 - end -end - -__fish_contains_opt -s z -or echo fails to find -z - -__fish_contains_opt -s c -or echo fails to find -c - -__fish_contains_opt -s x -and echo should not have found -x - -__fish_contains_opt -s x -s z -or echo fails to find -z - -__fish_contains_opt -s x -s c -or echo fails to find -c - -__fish_contains_opt -s x long1 -or echo fails to find --long1 - -__fish_contains_opt long2 -or echo fails to find --long2 - -__fish_contains_opt long1 long2 -or echo fails to find --long1 or --long2 - -__fish_contains_opt long3 -and echo should not have found --long3 - -__fish_contains_opt -s 4 long4 -or echo fails to find -4 - -__fish_contains_opt long4 -and echo should not have found --long4 - -__fish_contains_opt arg1 -and echo should not have found --arg1 - -__fish_contains_opt -s a -and echo should not have found -a - -# This should result in message written to stderr and an error status. -__fish_contains_opt -x w -and '"__fish_contains_opt -x w" should not have succeeded' - -true diff --git a/tests/__fish_contains_opt.out b/tests/__fish_contains_opt.out deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/__fish_not_contain_opt.err b/tests/__fish_not_contain_opt.err deleted file mode 100644 index 40cdbcd11..000000000 --- a/tests/__fish_not_contain_opt.err +++ /dev/null @@ -1 +0,0 @@ -__fish_not_contain_opt: Unknown option -x diff --git a/tests/__fish_not_contain_opt.out b/tests/__fish_not_contain_opt.out deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/__fish_not_contain_opt.in b/tests/checks/contains_opt.fish similarity index 53% rename from tests/__fish_not_contain_opt.in rename to tests/checks/contains_opt.fish index fd7ce4b5b..76cc43174 100644 --- a/tests/__fish_not_contain_opt.in +++ b/tests/checks/contains_opt.fish @@ -1,3 +1,4 @@ +#RUN: %fish %s function commandline if test $argv[1] = '-ct' echo --long4\n-4 @@ -6,6 +7,50 @@ function commandline end end +__fish_contains_opt -s z +or echo fails to find -z + +__fish_contains_opt -s c +or echo fails to find -c + +__fish_contains_opt -s x +and echo should not have found -x + +__fish_contains_opt -s x -s z +or echo fails to find -z + +__fish_contains_opt -s x -s c +or echo fails to find -c + +__fish_contains_opt -s x long1 +or echo fails to find --long1 + +__fish_contains_opt long2 +or echo fails to find --long2 + +__fish_contains_opt long1 long2 +or echo fails to find --long1 or --long2 + +__fish_contains_opt long3 +and echo should not have found --long3 + +__fish_contains_opt -s 4 long4 +or echo fails to find -4 + +__fish_contains_opt long4 +and echo should not have found --long4 + +__fish_contains_opt arg1 +and echo should not have found --arg1 + +__fish_contains_opt -s a +and echo should not have found -a + +# This should result in message written to stderr and an error status. +__fish_contains_opt -x w +and '"__fish_contains_opt -x w" should not have succeeded' +#CHECKERR: __fish_contains_opt: Unknown option -x + __fish_not_contain_opt -s z and echo should not have found -z @@ -48,5 +93,6 @@ or echo should not have found -a # This should result in message written to stderr and an error status. __fish_not_contain_opt -x w and '"__fish_not_contain_opt -x w" should not have succeeded' +#CHECKERR: __fish_not_contain_opt: Unknown option -x true