tr.test 340 B

1234567891011
  1. #!/bin/bash
  2. [ -f testing.sh ] && . testing.sh
  3. #testing "name" "command" "result" "infile" "stdin"
  4. testing "" "tr 1 2" "223223223" "" "123123123"
  5. testing "-d" "tr -d 1" "232323" "" "123123123"
  6. testing "-s" "tr -s 1" "12223331222333" "" "111222333111222333"
  7. testing "no pathological flushing" "seq 10000000 | tr 1 2 > /dev/null" "" "" ""