From 9c56862cd9d049bd298663f8b1bc3d957a5447cb Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 8 Nov 2017 22:31:30 +0100 Subject: t: add jecho.t --- t/jecho.t | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 t/jecho.t 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 -- cgit 1.4.1