about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-11-08 22:31:30 +0100
committerLeah Neukirchen <leah@vuxu.org>2017-11-08 22:31:30 +0100
commit9c56862cd9d049bd298663f8b1bc3d957a5447cb (patch)
treefd708fba3f45991edbd743eeabd1b465cefed33b
parent1a6b9937b00a3d60dedc5ace1a72f9aaf92d9b25 (diff)
downloadnecho-9c56862cd9d049bd298663f8b1bc3d957a5447cb.tar.gz
necho-9c56862cd9d049bd298663f8b1bc3d957a5447cb.tar.xz
necho-9c56862cd9d049bd298663f8b1bc3d957a5447cb.zip
t: add jecho.t HEAD v0.1 master
-rwxr-xr-xt/jecho.t40
1 files changed, 40 insertions, 0 deletions
diff --git a/t/jecho.t b/t/jecho.t
new file mode 100755
index 0000000..c098a82
--- /dev/null
+++ b/t/jecho.t
@@ -0,0 +1,40 @@
+#!/bin/sh
+export "PATH=.:t:$PATH"
+
+printf '1..6\n'
+printf '# jecho\n'
+
+tap3 "single string" <<'EOF'
+jecho hello; echo
+>>>
+hello
+EOF
+
+tap3 "two strings" <<'EOF'
+jecho hello random; echo
+>>>
+hellorandom
+EOF
+
+tap3 "no arguments" <<'EOF'
+jecho
+>>>
+EOF
+
+tap3 "empty argument" <<'EOF'
+jecho foo '' bar; echo
+>>>
+foobar
+EOF
+
+tap3 "string with minus" <<'EOF'
+jecho -n -e; echo
+>>>
+-n-e
+EOF
+
+tap3 "string with double minus" <<'EOF'
+jecho -n -- -e; echo
+>>>
+-n---e
+EOF