| 1 | #!/bin/sh |
| 2 | |
| 3 | errorexit() { |
| 4 | echo $1 |
| 5 | exit 1 |
| 6 | } |
| 7 | |
| 8 | rm -f sms.sms || errorexit "could not delete sms.sms" |
| 9 | touch sms.sms || errorexit "could not create sms.sms" |
| 10 | |
| 11 | # prepare locales to make date format reproducible |
| 12 | LC_ALL=en_US |
| 13 | LANG=en |
| 14 | LINGUAS=en |
| 15 | export LC_ALL LANG LINGUAS |
| 16 | |
| 17 | # run the test |
| 18 | ./testssms > testssms.log |
| 19 | |
| 20 | # check if output differs from what it should be |
| 21 | diff testssms.log testssms-output.txt |