Skip to content

Commit fa85607

Browse files
committed
Add test for inverse-exe mode
- Deletes all numbers not 1
1 parent 6d769e6 commit fa85607

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,11 @@ TEST_NUM=9
7979
assert "$DIFF" $LINENO $TEST_NUM
8080
echo "+ test $TEST_NUM to execute command on every line passed"
8181

82+
cat test_files/numbers.txt | ../vims -r '^1$' 'dd' > .tmp
83+
DIFF=$(diff -b .tmp test_files/numbers_delete_all_not_1.txt)
84+
TEST_NUM=10
85+
assert "$DIFF" $LINENO $TEST_NUM
86+
echo "+ test $TEST_NUM to delete all numbers not 1 passed"
87+
8288
echo "+ tests all passed"
8389
rm .tmp

0 commit comments

Comments
 (0)