about summary refs log tree commit diff
path: root/t/jecho.t
blob: c098a82871eede961b57227fa0966664bd5a9e61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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