| 1 | #!/bin/bash |
| 2 | |
| 3 | # |
| 4 | # This file is part of util-linux. |
| 5 | # |
| 6 | # This file is free software; you can redistribute it and/or modify |
| 7 | # it under the terms of the GNU General Public License as published by |
| 8 | # the Free Software Foundation; either version 2 of the License, or |
| 9 | # (at your option) any later version. |
| 10 | # |
| 11 | # This file is distributed in the hope that it will be useful, |
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | # GNU General Public License for more details. |
| 15 | # |
| 16 | TS_TOPDIR="${0%/*}/../.." |
| 17 | TS_DESC="regressions" |
| 18 | |
| 19 | . "$TS_TOPDIR"/functions.sh |
| 20 | ts_init "$*" |
| 21 | ts_check_wcsspn |
| 22 | |
| 23 | ts_check_test_command "$TS_CMD_COLCRT" |
| 24 | ts_check_prog "timeout" |
| 25 | ts_check_prog "env" |
| 26 | |
| 27 | check_input_file() { |
| 28 | ts_init_subtest ${1##*/} |
| 29 | timeout 2 env LC_ALL=C.UTF-8 $TS_CMD_COLCRT < $1 >> $TS_OUTPUT 2>> $TS_ERRLOG |
| 30 | echo "return value: $?" >> $TS_OUTPUT |
| 31 | sed -i -e 's/Illegal byte sequence/Invalid or incomplete multibyte or wide character/' $TS_ERRLOG |
| 32 | ts_finalize_subtest |
| 33 | } |
| 34 | |
| 35 | check_input_file "$TS_SELF/crash1" |
| 36 | check_input_file "$TS_SELF/crash2" |
| 37 | check_input_file "$TS_SELF/hang1" |
| 38 | |
| 39 | ts_finalize |