diff options
| author | J08nY | 2017-06-01 01:50:39 +0200 |
|---|---|---|
| committer | J08nY | 2017-06-01 01:50:39 +0200 |
| commit | ac0e0d476128542dc6307df552129efae221ab1d (patch) | |
| tree | 8ee908403ad62c8e7636f2a3140ae6acd2d6d345 /test | |
| parent | 261e0ce6530387db48a07c3f8925dd67e63c28bf (diff) | |
| download | ecgen-ac0e0d476128542dc6307df552129efae221ab1d.tar.gz ecgen-ac0e0d476128542dc6307df552129efae221ab1d.tar.zst ecgen-ac0e0d476128542dc6307df552129efae221ab1d.zip | |
Fix tests printing.
Diffstat (limited to 'test')
| -rwxr-xr-x | test/ecgen.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/ecgen.sh b/test/ecgen.sh index 692f1b7..6bc63b3 100755 --- a/test/ecgen.sh +++ b/test/ecgen.sh @@ -23,8 +23,10 @@ function csv() { function json() { start_test - fp=$(${ecgen} --fp -tjson --input=fp_10_a.csv.in 10) - f2m=$(${ecgen} --f2m -tjson --input=f2m_10_a.csv.in 10) + assert_raises "${ecgen} --fp -tjson --input=fp_10_a.csv.in 10" + assert_raises "${ecgen} --f2m -tjson --input=f2m_10_a.csv.in 10" + fp=$(${ecgen} --fp -tjson --input=fp_10_a.csv.in 10 2>/dev/null) + f2m=$(${ecgen} --f2m -tjson --input=f2m_10_a.csv.in 10 2>/dev/null) assert_raises "${JSON}" 0 "${fp}" assert_matches "${JSON} -x field\\\",\\\"p" "0x000b" "${fp}" assert_matches "${JSON} -x \\\"a\\\"" "0x0001" "${fp}" @@ -71,7 +73,7 @@ function exhaustive() { function anomalous() { start_test assert_raises "${ecgen} --fp --anomalous -r 20" - out=$(${ecgen} --fp -tjson --anomalous -r 20) + out=$(${ecgen} --fp -tjson --anomalous -r 20 2>/dev/null) p=$(echo $out | ${JSON} -x field\",\"p | cut -f 2) order=$(echo $out | ${JSON} -x ^0,\"order\" | cut -f 2) assert "strip_num $p" $(strip_num $order) |
