diff options
author | Rob Landley <rob@landley.net> | 2021-01-26 18:50:50 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2021-01-26 18:50:50 -0600 |
commit | 2b4abd05efcc96061eaa87a6fdbc3f7121fd2c08 (patch) | |
tree | 5b2a372b400388ad7446d71aff9310299060f16f /tests | |
parent | 76d3160cfabe15568f006ad530c105b9ad6fdcdd (diff) | |
download | toybox-2b4abd05efcc96061eaa87a6fdbc3f7121fd2c08.tar.gz |
Fix bug pointed out by asm89 and add test.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/netcat.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/netcat.test b/tests/netcat.test new file mode 100755 index 00000000..40b51d40 --- /dev/null +++ b/tests/netcat.test @@ -0,0 +1,11 @@ +#!/bin/bash + +[ -f testing.sh ] && . testing.sh + +#testing "name" "command" "result" "infile" "stdin" + +{ dd if=/dev/zero bs=4k count=1 2>/dev/null | tr '\0' a; echo b; } > testfile +testing "more than buffer bytes left at end" \ + "netcat -lp 1234 wc -c & cat testfile | netcat 127.0.0.1 1234" \ + "4098\n" "" "" +rm -f testfile |