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