mirror of
git://git.suckless.org/sbase
synced 2026-01-26 21:52:15 +00:00
Using an EXEC variable for every test make easy to run tools to debug issues like for example using EXEC=valgrind ./0025-ed.sh. Some tests for ed had a wrong path to the ed binary and they were not testing the actual ed but the system one.
21 lines
164 B
Bash
Executable File
21 lines
164 B
Bash
Executable File
#!/bin/sh
|
|
|
|
tmp=tmp.$$
|
|
|
|
trap 'rm -f $tmp' EXIT
|
|
trap 'exit $?' HUP INT TERM
|
|
|
|
touch $tmp
|
|
$EXEC ../ed -s $tmp <<EOF | (read a && test $a = 1)
|
|
a
|
|
1
|
|
.
|
|
w
|
|
,c
|
|
2
|
|
.
|
|
W
|
|
e
|
|
1p
|
|
EOF
|