| 1 |
#! /usr/bin/perl |
| 2 |
|
| 3 |
# bug i29 - Incorrect parsing of 1.0 CM files with 0 filter threshold points. |
| 4 |
# |
| 5 |
# EPN, Wed Jul 25 10:34:43 2012 |
| 6 |
# |
| 7 |
# If a 1.0 CM file had 0 filter threshold points it had 2 blank lines |
| 8 |
# after the 'FT-' prefixed line, this caused the 1.1 cm_file.c:read_asc_1p0_cm() |
| 9 |
# function to incorrectly parse the file and return a failure code. |
| 10 |
# |
| 11 |
# See BUGTRAX i29 description for more information. |
| 12 |
# |
| 13 |
# bug-i29.cm - RF00974 CM file, sent by Jen Daub which causes cmconvert 1.1rc1 |
| 14 |
# to fail. |
| 15 |
|
| 16 |
$usage = "perl bug-i29.pl <cmconvert> <path to bug-i29.cm>\n"; |
| 17 |
if ($#ARGV != 1) { die "Wrong argument number.\n$usage"; } |
| 18 |
|
| 19 |
$cmconvert = shift; |
| 20 |
$cmfile = shift; |
| 21 |
$ok = 1; |
| 22 |
|
| 23 |
if ($ok) { |
| 24 |
system("$cmconvert $cmfile > /dev/null 2> /dev/null"); |
| 25 |
if ($? != 0) { $ok = 0; } |
| 26 |
} |
| 27 |
|
| 28 |
if ($ok) { print "ok\n"; exit 0; } |
| 29 |
else { print "FAILED\n"; exit 1; } |
| 30 |
|
| 31 |
|