diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/jecho.t | 40 |
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 |