aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-10-17 02:56:03 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-10-17 02:56:03 -0700
commit7ee0ce745e7ed4b7672decc8bd18d2057cd47d82 (patch)
tree160da4cd512e076fec539fe5706fe7873096f631 /tests
parent469743cd230e884be047abe9d8d8338efbb16c0f (diff)
Implement -e option to echo (to interpret special characters), and -E to not interpret them
Diffstat (limited to 'tests')
-rw-r--r--tests/test1.in16
-rw-r--r--tests/test1.out12
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/test1.in b/tests/test1.in
index ff3ef778..a3ac131e 100644
--- a/tests/test1.in
+++ b/tests/test1.in
@@ -73,3 +73,19 @@ else
set sta fail
end
echo Test 5 $sta
+
+# echo tests
+
+echo 'abc\ndef'
+echo -e 'abc\ndef'
+echo -e 'abc\zdef'
+echo -e 'abc\41def'
+echo -e 'abc\041def'
+echo -e 'abc\121def'
+echo -e 'abc\1212def'
+echo -e 'abc\cdef'
+
+echo -e Catch your breath
+
+echo -e 'abc\x21def'
+echo -e 'abc\x211def'
diff --git a/tests/test1.out b/tests/test1.out
index f20a722f..5ca9888c 100644
--- a/tests/test1.out
+++ b/tests/test1.out
@@ -7,3 +7,15 @@ Test pass
Test 3 pass
Test 4 pass
Test 5 pass
+abc\ndef
+abc
+def
+abc\zdef
+abc!def
+abc!def
+abcQdef
+abcQ2def
+abc
+Catch your breath
+abc!def
+abc!1def