From 23bd0c41457262e7ef5223a187e3c15e44be039c Mon Sep 17 00:00:00 2001 From: netblue30 Date: Mon, 25 Jul 2016 12:29:00 -0400 Subject: argument subsystem testing framework --- test/arguments/symrun.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 test/arguments/symrun.sh (limited to 'test/arguments/symrun.sh') diff --git a/test/arguments/symrun.sh b/test/arguments/symrun.sh new file mode 100755 index 000000000..b46803ae2 --- /dev/null +++ b/test/arguments/symrun.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +mkdir symtest +ln -s /usr/bin/firejail symtest/argtest + +echo "TESTING: 2.1 - simple args" +symtest/argtest arg1 arg2 + +# simple quotes, testing spaces in file names +echo "TESTING: 2.2 - args with space and \"" +symtest/argtest "arg1 tail" "arg2 tail" + +echo "TESTING: 2.3 - args with space and '" +symtest/argtest 'arg1 tail' 'arg2 tail' + +# escaped space in file names +echo "TESTING: 2.4 - args with space and \\" +symtest/argtest arg1\ tail arg2\ tail + +# & char appears in URLs - URLs should be quoted +echo "TESTING: 2.5 - args with & and \"" +symtest/argtest "arg1&tail" "arg2&tail" + +echo "TESTING: 2.6 - args with & and '" +symtest/argtest 'arg1&tail' 'arg2&tail' + +rm -fr symtest -- cgit v1.2.3-54-g00ecf