Rob Landley | 2665cd0 | 2016-03-15 15:02:21 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | [ -f testing.sh ] && . testing.sh |
| 4 | |
| 5 | #testing "name" "command" "result" "infile" "stdin" |
| 6 | |
Rob Landley | 216e4da | 2017-04-04 18:13:51 -0500 | [diff] [blame] | 7 | testcmd "simple" "" "c2ltcGxlCg==\n" "" "simple\n" |
| 8 | testcmd "file" "input" "c2ltcGxlCg==\n" "simple\n" "" |
| 9 | testcmd "simple -d" "-d" "simple\n" "" "c2ltcGxlCg==\n" |
| 10 | testcmd "simple -d" "-d input" "simple\n" "c2ltcGxlCg==" "" |
| 11 | testcmd "default wrap" "" \ |
Rob Landley | 2665cd0 | 2016-03-15 15:02:21 -0500 | [diff] [blame] | 12 | "V2UndmUgcmVwbGFjZWQgdGhlIGRpbGl0aGl1bSB0aGV5IG5vcm1hbGx5IHVzZSB3aXRoIEZvbGdl\ncidzIENyeXN0YWxzLg==\n" \ |
| 13 | "" "We've replaced the dilithium they normally use with Folger's Crystals." |
Rob Landley | 216e4da | 2017-04-04 18:13:51 -0500 | [diff] [blame] | 14 | testcmd "multiline -d " "-d" \ |
Rob Landley | 2665cd0 | 2016-03-15 15:02:21 -0500 | [diff] [blame] | 15 | "We've replaced the dilithium they normally use with Folger's Crystals." "" \ |
| 16 | "V2UndmUgcmVwbGFjZWQgdGhlIGRpbGl0aGl1bSB0aGV5IG5vcm1hbGx5IHVzZSB3aXRoIEZvbGdl\ncidzIENyeXN0YWxzLg==\n" |
| 17 | |
Rob Landley | 216e4da | 2017-04-04 18:13:51 -0500 | [diff] [blame] | 18 | testcmd "-w" "-w 10" \ |
Rob Landley | 2665cd0 | 2016-03-15 15:02:21 -0500 | [diff] [blame] | 19 | "TWFyY2hpbm\ncgdG8gdGhl\nIGJlYXQgb2\nYgYSBkaWZm\nZXJlbnQga2\nV0dGxlIG9m\nIGZpc2guCg\n==\n" \ |
| 20 | "" "Marching to the beat of a different kettle of fish.\n" |
| 21 | |
Rob Landley | 216e4da | 2017-04-04 18:13:51 -0500 | [diff] [blame] | 22 | testcmd "-w0" "-w0 input" \ |
Rob Landley | 2665cd0 | 2016-03-15 15:02:21 -0500 | [diff] [blame] | 23 | "VmlraW5ncz8gVGhlcmUgYWluJ3Qgbm8gdmlraW5ncyBoZXJlLiBKdXN0IHVzIGhvbmVzdCBmYXJtZXJzLiBUaGUgdG93biB3YXMgYnVybmluZywgdGhlIHZpbGxhZ2VycyB3ZXJlIGRlYWQuIFRoZXkgZGlkbid0IG5lZWQgdGhvc2Ugc2hlZXAgYW55d2F5LiBUaGF0J3Mgb3VyIHN0b3J5IGFuZCB3ZSdyZSBzdGlja2luZyB0byBpdC4K" \ |
| 24 | "Vikings? There ain't no vikings here. Just us honest farmers. The town was burning, the villagers were dead. They didn't need those sheep anyway. That's our story and we're sticking to it.\n" "" |