diff options
Diffstat (limited to 'shell/ash_test/ash-quoting')
-rw-r--r-- | shell/ash_test/ash-quoting/mode_x.right | 10 | ||||
-rwxr-xr-x | shell/ash_test/ash-quoting/mode_x.tests | 14 |
2 files changed, 24 insertions, 0 deletions
diff --git a/shell/ash_test/ash-quoting/mode_x.right b/shell/ash_test/ash-quoting/mode_x.right new file mode 100644 index 0000000..c2dd355 --- /dev/null +++ b/shell/ash_test/ash-quoting/mode_x.right @@ -0,0 +1,10 @@ ++ var1=val ++ var2='one two' ++ true '%s\n' one 'two '"'"'three' four ++ this=command ++ 'this=command' +./mode_x.tests: line 1: this=command: not found ++ true ++ true ++ 'if' true +./mode_x.tests: line 1: if: not found diff --git a/shell/ash_test/ash-quoting/mode_x.tests b/shell/ash_test/ash-quoting/mode_x.tests new file mode 100755 index 0000000..16dae3f --- /dev/null +++ b/shell/ash_test/ash-quoting/mode_x.tests @@ -0,0 +1,14 @@ +set -x + +var1=val +var2='one two' +true %s\\n one "two 'three" four + +# assignment: +this=command +# NOT assignment, +x code should show it quoted: +"this=command" + +if true; then true; fi +# +x code should quote 'if' here: +"if" true |