diff options
Diffstat (limited to 'test/arguments/symrun.sh')
-rwxr-xr-x | test/arguments/symrun.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/arguments/symrun.sh b/test/arguments/symrun.sh new file mode 100755 index 000000000..d28f024a8 --- /dev/null +++ b/test/arguments/symrun.sh | |||
@@ -0,0 +1,30 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | mkdir symtest | ||
4 | ln -s /usr/bin/firejail symtest/argtest | ||
5 | |||
6 | # search for argtest in current directory | ||
7 | export PATH=$PATH:. | ||
8 | |||
9 | echo "TESTING: 2.1 - simple args" | ||
10 | symtest/argtest arg1 arg2 | ||
11 | |||
12 | # simple quotes, testing spaces in file names | ||
13 | echo "TESTING: 2.2 - args with space and \"" | ||
14 | symtest/argtest "arg1 tail" "arg2 tail" | ||
15 | |||
16 | echo "TESTING: 2.3 - args with space and '" | ||
17 | symtest/argtest 'arg1 tail' 'arg2 tail' | ||
18 | |||
19 | # escaped space in file names | ||
20 | echo "TESTING: 2.4 - args with space and \\" | ||
21 | symtest/argtest arg1\ tail arg2\ tail | ||
22 | |||
23 | # & char appears in URLs - URLs should be quoted | ||
24 | echo "TESTING: 2.5 - args with & and \"" | ||
25 | symtest/argtest "arg1&tail" "arg2&tail" | ||
26 | |||
27 | echo "TESTING: 2.6 - args with & and '" | ||
28 | symtest/argtest 'arg1&tail' 'arg2&tail' | ||
29 | |||
30 | rm -fr symtest | ||