• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3[ -f testing.sh ] && . testing.sh
4
5#testing "name" "command" "result" "infile" "stdin"
6
7{ dd if=/dev/zero bs=4k count=1 2>/dev/null | tr '\0' a; echo b; } > testfile
8testing "more than buffer bytes left at end" \
9  "netcat -lp 1234 wc -c & sleep .1 && cat testfile | netcat 127.0.0.1 1234" \
10  "4098\n" "" ""
11rm -f testfile
12