diff options
author | Leah Neukirchen <leah@vuxu.org> | 2017-11-08 22:31:30 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2017-11-08 22:31:30 +0100 |
commit | 9c56862cd9d049bd298663f8b1bc3d957a5447cb (patch) | |
tree | fd708fba3f45991edbd743eeabd1b465cefed33b | |
parent | 1a6b9937b00a3d60dedc5ace1a72f9aaf92d9b25 (diff) | |
download | necho-master.tar.gz necho-master.tar.xz necho-master.zip |
-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 |