From 8cb83eee5a58b1fad74c34094ce3afb9e430b5a4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 04:42:50 +0200 Subject: Adding upstream version 2.33.1. Signed-off-by: Daniel Baumann --- tests/ts/colcrt/crash1 | Bin 0 -> 314 bytes tests/ts/colcrt/crash2 | Bin 0 -> 776 bytes tests/ts/colcrt/functional | 50 ++++++++++++++++++++++++++++++++++++++++++++ tests/ts/colcrt/hang1 | 1 + tests/ts/colcrt/nasty-input | Bin 0 -> 545 bytes tests/ts/colcrt/regressions | 36 +++++++++++++++++++++++++++++++ tests/ts/colcrt/underlines | 23 ++++++++++++++++++++ 7 files changed, 110 insertions(+) create mode 100644 tests/ts/colcrt/crash1 create mode 100644 tests/ts/colcrt/crash2 create mode 100755 tests/ts/colcrt/functional create mode 100644 tests/ts/colcrt/hang1 create mode 100644 tests/ts/colcrt/nasty-input create mode 100755 tests/ts/colcrt/regressions create mode 100644 tests/ts/colcrt/underlines (limited to 'tests/ts/colcrt') diff --git a/tests/ts/colcrt/crash1 b/tests/ts/colcrt/crash1 new file mode 100644 index 0000000..6681181 Binary files /dev/null and b/tests/ts/colcrt/crash1 differ diff --git a/tests/ts/colcrt/crash2 b/tests/ts/colcrt/crash2 new file mode 100644 index 0000000..0843cb6 Binary files /dev/null and b/tests/ts/colcrt/crash2 differ diff --git a/tests/ts/colcrt/functional b/tests/ts/colcrt/functional new file mode 100755 index 0000000..5c97d24 --- /dev/null +++ b/tests/ts/colcrt/functional @@ -0,0 +1,50 @@ +#!/bin/bash + +# +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +TS_TOPDIR="${0%/*}/../.." +TS_DESC="functional" + +export LC_CTYPE='C' + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +ts_check_test_command "$TS_CMD_COLCRT" + +ts_init_subtest 'no-options' +$TS_CMD_COLCRT < $TS_SELF/nasty-input >> $TS_OUTPUT 2>&1 +$TS_CMD_COLCRT < $TS_SELF/underlines >> $TS_OUTPUT 2>&1 +echo "return value: $?" >> $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest 'no-underlining' +$TS_CMD_COLCRT --no-underlining < $TS_SELF/nasty-input >> $TS_OUTPUT 2>&1 +$TS_CMD_COLCRT --no-underlining < $TS_SELF/underlines >> $TS_OUTPUT 2>&1 +echo "return value: $?" >> $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest 'half-lines' +$TS_CMD_COLCRT --half-lines < $TS_SELF/nasty-input >> $TS_OUTPUT 2>&1 +$TS_CMD_COLCRT --half-lines < $TS_SELF/underlines >> $TS_OUTPUT 2>&1 +echo "return value: $?" >> $TS_OUTPUT +ts_finalize_subtest + +ts_init_subtest 'short-options' +$TS_CMD_COLCRT - -2 $TS_SELF/nasty-input >> $TS_OUTPUT 2>&1 +$TS_CMD_COLCRT - -2 $TS_SELF/underlines >> $TS_OUTPUT 2>&1 +echo "return value: $?" >> $TS_OUTPUT +ts_finalize_subtest + +ts_finalize diff --git a/tests/ts/colcrt/hang1 b/tests/ts/colcrt/hang1 new file mode 100644 index 0000000..d26259e --- /dev/null +++ b/tests/ts/colcrt/hang1 @@ -0,0 +1 @@ +789:;<=>=>?IABUVNXYZ[_`abcdefgg !"#$%&'()*+,-./01234)*:,-./0123456789:;[=>?1234)*:,-./0123456789:;[=>?4456789:;<=>?IABUVN`abcdefg !" $%&'()*+,-./0123z{|ü~e \ No newline at end of file diff --git a/tests/ts/colcrt/nasty-input b/tests/ts/colcrt/nasty-input new file mode 100644 index 0000000..5e541bc Binary files /dev/null and b/tests/ts/colcrt/nasty-input differ diff --git a/tests/ts/colcrt/regressions b/tests/ts/colcrt/regressions new file mode 100755 index 0000000..394c4e8 --- /dev/null +++ b/tests/ts/colcrt/regressions @@ -0,0 +1,36 @@ +#!/bin/bash + +# +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +TS_TOPDIR="${0%/*}/../.." +TS_DESC="regressions" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +ts_check_test_command "$TS_CMD_COLCRT" +ts_check_prog "timeout" + +check_input_file() { + ts_init_subtest ${1##*/} + timeout 2 $TS_CMD_COLCRT < $1 > $TS_OUTPUT 2>&1 + echo "return value: $?" >> $TS_OUTPUT + ts_finalize_subtest +} + +check_input_file "$TS_SELF/crash1" +check_input_file "$TS_SELF/crash2" +check_input_file "$TS_SELF/hang1" + +ts_finalize diff --git a/tests/ts/colcrt/underlines b/tests/ts/colcrt/underlines new file mode 100644 index 0000000..940c7a8 --- /dev/null +++ b/tests/ts/colcrt/underlines @@ -0,0 +1,23 @@ + 200 ___ + 201 abc + 202 _abc + 203 a_bc + 204 ab_c + 205 abc_ + 206 __abc + 207 a__bc + 208 ab__c + 209 abc__ + 210 _a_bc + 211 _ab_c + 212 a_b_c + 213 a__bc + 214 a_bc_ + 215 abc__ + 216 _abc_ + 217 _a_b_c + 218 _a__bc + 219 a__bc_ + 220 _abc__ + 221 ___abc + 222 abc___ -- cgit v1.2.3