aboutsummaryrefslogtreecommitdiff
path: root/tests/tr.test
blob: bb00a3ff4c6e7ff870cabcfe17c3f0df7439f363 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

[ -f testing.sh ] && . testing.sh

#testing "name" "command" "result" "infile" "stdin"

testing "" "tr 1 2" "223223223" "" "123123123"
testing "-d" "tr -d 1" "232323" "" "123123123"
testing "-s" "tr -s 1" "12223331222333" "" "111222333111222333"

testing "no pathological flushing" "seq 10000000 | tr 1 2 > /dev/null" "" "" ""