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