Debian Codegraph @

util/gnu-patches/tests_env_env-S.pl.patch

raw
1 Index: gnu/tests/env/env-S.pl
2 ===================================================================
3 --- gnu.orig/tests/env/env-S.pl
4 +++ gnu/tests/env/env-S.pl
5 @@ -216,15 +216,15 @@ my @Tests =
6
7 # Test Error Conditions
8 ['err1', q[-S'"\\c"'], {EXIT=>125},
9 - {ERR=>"$prog: '\\c' must not appear in double-quoted -S string\n"}],
10 + {ERR=>"$prog: '\\c' must not appear in double-quoted -S string at position 2\n"}],
11 ['err2', q[-S'A=B\\'], {EXIT=>125},
12 - {ERR=>"$prog: invalid backslash at end of string in -S\n"}],
13 + {ERR=>"$prog: invalid backslash at end of string in -S at position 4 in context Unquoted\n"}],
14 ['err3', q[-S'"A=B\\"'], {EXIT=>125},
15 - {ERR=>"$prog: no terminating quote in -S string\n"}],
16 + {ERR=>"$prog: no terminating quote in -S string at position 6 for quote '\"'\n"}],
17 ['err4', q[-S"'A=B\\\\'"], {EXIT=>125},
18 - {ERR=>"$prog: no terminating quote in -S string\n"}],
19 + {ERR=>"$prog: no terminating quote in -S string at position 6 for quote '''\n"}],
20 ['err5', q[-S'A=B\\q'], {EXIT=>125},
21 - {ERR=>"$prog: invalid sequence '\\q' in -S\n"}],
22 + {ERR=>"$prog: invalid sequence '\\q' in -S at position 4\n"}],
23 ['err6', q[-S'A=$B'], {EXIT=>125},
24 {ERR=>"$prog: only \${VARNAME} expansion is supported, error at: \$B\n"}],
25 ['err7', q[-S'A=${B'], {EXIT=>125},
26 @@ -239,13 +239,17 @@ my @Tests =
27
28 # Test incorrect shebang usage (extraneous whitespace).
29 ['err_sp2', q['-v -S cat -n'], {EXIT=>125},
30 - {ERR=>"env: invalid option -- ' '\n" .
31 - "env: use -[v]S to pass options in shebang lines\n" .
32 - "Try 'env --help' for more information.\n"}],
33 + {ERR=>"error: unexpected argument '- ' found\n\n" .
34 + " tip: to pass '- ' as a value, use '-- - '\n\n" .
35 + "Usage: $prog [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]\n\n" .
36 + "For more information, try '--help'.\n" .
37 + "$prog: use -[v]S to pass options in shebang lines\n"}],
38 ['err_sp3', q['-v -S cat -n'], {EXIT=>125}, # embedded tab after -v
39 - {ERR=>"env: invalid option -- '\t'\n" .
40 - "env: use -[v]S to pass options in shebang lines\n" .
41 - "Try 'env --help' for more information.\n"}],
42 + {ERR=>"error: unexpected argument '-\t' found\n\n" .
43 + " tip: to pass '-\t' as a value, use '-- -\t'\n\n" .
44 + "Usage: $prog [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]\n\n" .
45 + "For more information, try '--help'.\n" .
46 + "$prog: use -[v]S to pass options in shebang lines\n"}],
47
48 # Also diagnose incorrect shebang usage when failing to exec.
49 # This typically happens with: