tests/30-amplitude.test
raw| 1 | #!/bin/bash |
| 2 | |
| 3 | flags="1200 $*" |
| 4 | |
| 5 | let count=0 |
| 6 | let fail=0 |
| 7 | |
| 8 | function try_tx_rx_ampl |
| 9 | { |
| 10 | a="$1" |
| 11 | echo -n "$a " |
| 12 | let count++ |
| 13 | ./self-test testdata-ascii.txt --volume $a $flags -- $flags || let fail++ |
| 14 | } |
| 15 | |
| 16 | for ampl in 3.50 1.00 0.30 0.01 " E " |
| 17 | do |
| 18 | try_tx_rx_ampl "$ampl" |
| 19 | done |
| 20 | |
| 21 | if [ $fail -eq 0 ] |
| 22 | then |
| 23 | echo " (all $count amplitude tests passed)" |
| 24 | else |
| 25 | echo " ($fail/$count amplitude tests failed)" |
| 26 | fi |
| 27 | exit $fail |