about summary refs log tree commit diff
path: root/t/necho.t
diff options
context:
space:
mode:
Diffstat (limited to 't/necho.t')
-rwxr-xr-xt/necho.t46
1 files changed, 46 insertions, 0 deletions
diff --git a/t/necho.t b/t/necho.t
new file mode 100755
index 0000000..27493ba
--- /dev/null
+++ b/t/necho.t
@@ -0,0 +1,46 @@
+#!/bin/sh
+export "PATH=.:t:$PATH"
+
+printf '1..6\n'
+printf '# necho\n'
+
+tap3 "single string" <<'EOF'
+necho hello
+>>>
+hello
+EOF
+
+tap3 "two strings" <<'EOF'
+necho hello random
+>>>
+hello
+random
+EOF
+
+tap3 "no arguments" <<'EOF'
+necho
+>>>
+EOF
+
+tap3 "empty argument" <<'EOF'
+necho foo '' bar
+>>>
+foo
+
+bar
+EOF
+
+tap3 "string with minus" <<'EOF'
+necho -n -e
+>>>
+-n
+-e
+EOF
+
+tap3 "string with double minus" <<'EOF'
+necho -n -- -e
+>>>
+-n
+--
+-e
+EOF