]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: split test into subtest
authorVojtěch Eichler <vojta.eich@gmail.com>
Mon, 4 Oct 2021 14:46:22 +0000 (16:46 +0200)
committerVojtěch Eichler <vojta.eich@gmail.com>
Mon, 4 Oct 2021 14:46:22 +0000 (16:46 +0200)
17 files changed:
tests/expected/col/io
tests/expected/col/io-allocate-here [new file with mode: 0644]
tests/expected/col/io-cr [new file with mode: 0644]
tests/expected/col/io-cs-alternate [new file with mode: 0644]
tests/expected/col/io-cs-normal [new file with mode: 0644]
tests/expected/col/io-esc-backspace [new file with mode: 0644]
tests/expected/col/io-esc-tab [new file with mode: 0644]
tests/expected/col/io-flushing [new file with mode: 0644]
tests/expected/col/io-half-line [new file with mode: 0644]
tests/expected/col/io-reverse-lf [new file with mode: 0644]
tests/expected/col/io-so-si [new file with mode: 0644]
tests/expected/col/io-tab-backspace [new file with mode: 0644]
tests/expected/col/io-trailing-spaces [new file with mode: 0644]
tests/expected/col/io-various-spaces [new file with mode: 0644]
tests/expected/col/io-vt1 [new file with mode: 0644]
tests/expected/col/io-vt2 [new file with mode: 0644]
tests/ts/col/io

index d74a8586dd1223d35ab519f13450440e40ba17af..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,238 +0,0 @@
-trailing spaces
-1
-2
-tab backspace
-1      2
-various spaces
-1      2
-cr
-1\b2
-vt1
-1
-2\b43
-5
-vt2
-  c
-
- b
-
-a
-reverse lf
-13
-2
-so si
-esc-tab
-
-1
-esc-backspace
-12
-cs_normal
-       \ e0
-\ f<B
-cs_alternate
-1      \ e2\ f
-allocate here
-       2
-1\b3
-half line
-\e9\r1
-\e9flushing
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150
-151
-152
-153
-154
-155
-156
-157
-158
-159
-160
-161
-162
-163
-164
-165
-166
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-177
-178
-179
-180
-181
-182
-183
-184
-185
-186
-187
-188
-189
-190
-191
-192
-193
-194
-195
-196
-197
-198
-199
diff --git a/tests/expected/col/io-allocate-here b/tests/expected/col/io-allocate-here
new file mode 100644 (file)
index 0000000..a8a72ea
--- /dev/null
@@ -0,0 +1,2 @@
+       2
+1\b3
diff --git a/tests/expected/col/io-cr b/tests/expected/col/io-cr
new file mode 100644 (file)
index 0000000..68b1bf4
--- /dev/null
@@ -0,0 +1 @@
+1\b2
diff --git a/tests/expected/col/io-cs-alternate b/tests/expected/col/io-cs-alternate
new file mode 100644 (file)
index 0000000..ef71bac
--- /dev/null
@@ -0,0 +1 @@
+1      \ e2\ f
diff --git a/tests/expected/col/io-cs-normal b/tests/expected/col/io-cs-normal
new file mode 100644 (file)
index 0000000..8e508a0
--- /dev/null
@@ -0,0 +1,2 @@
+       \ e0
+\ f<B
diff --git a/tests/expected/col/io-esc-backspace b/tests/expected/col/io-esc-backspace
new file mode 100644 (file)
index 0000000..48082f7
--- /dev/null
@@ -0,0 +1 @@
+12
diff --git a/tests/expected/col/io-esc-tab b/tests/expected/col/io-esc-tab
new file mode 100644 (file)
index 0000000..a464d9d
--- /dev/null
@@ -0,0 +1,2 @@
+
+1
diff --git a/tests/expected/col/io-flushing b/tests/expected/col/io-flushing
new file mode 100644 (file)
index 0000000..ed94203
--- /dev/null
@@ -0,0 +1,199 @@
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
diff --git a/tests/expected/col/io-half-line b/tests/expected/col/io-half-line
new file mode 100644 (file)
index 0000000..5ae15e2
--- /dev/null
@@ -0,0 +1,2 @@
+\e9\r1
+\e9
\ No newline at end of file
diff --git a/tests/expected/col/io-reverse-lf b/tests/expected/col/io-reverse-lf
new file mode 100644 (file)
index 0000000..abee444
--- /dev/null
@@ -0,0 +1,2 @@
+13
+2
diff --git a/tests/expected/col/io-so-si b/tests/expected/col/io-so-si
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/expected/col/io-tab-backspace b/tests/expected/col/io-tab-backspace
new file mode 100644 (file)
index 0000000..2f80e61
--- /dev/null
@@ -0,0 +1 @@
+1      2
diff --git a/tests/expected/col/io-trailing-spaces b/tests/expected/col/io-trailing-spaces
new file mode 100644 (file)
index 0000000..1191247
--- /dev/null
@@ -0,0 +1,2 @@
+1
+2
diff --git a/tests/expected/col/io-various-spaces b/tests/expected/col/io-various-spaces
new file mode 100644 (file)
index 0000000..9874d64
--- /dev/null
@@ -0,0 +1 @@
+1      2
diff --git a/tests/expected/col/io-vt1 b/tests/expected/col/io-vt1
new file mode 100644 (file)
index 0000000..ff8730b
--- /dev/null
@@ -0,0 +1,3 @@
+1
+2\b43
+5
diff --git a/tests/expected/col/io-vt2 b/tests/expected/col/io-vt2
new file mode 100644 (file)
index 0000000..4a5062e
--- /dev/null
@@ -0,0 +1,5 @@
+  c
+
+ b
+
+a
index 62f6a8157980354efb47f2414a59b43fb428865a..c7e0d09d8073f7155bbc73a58abd2731d6485b25 100755 (executable)
@@ -23,49 +23,64 @@ ts_init "$*"
 
 ts_check_test_command "$TS_CMD_COL"
 
-ts_log "trailing spaces"
+ts_init_subtest "trailing-spaces"
 printf "1 \t\n2\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "tab backspace"
+ts_init_subtest "tab-backspace"
 printf "1\t\x082\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "various spaces"
+ts_init_subtest "various-spaces"
 printf "1 \t\f2\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "cr"
+ts_init_subtest "cr"
 printf "1\r2\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "vt1"
+ts_init_subtest "vt1"
 printf "1\n23\v\n4\n5\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "vt2"
+ts_init_subtest "vt2"
 printf "a\v\vb\v\vc" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "reverse lf"
+ts_init_subtest "reverse-lf"
 printf "1\n2\e\x073\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "so si"
+ts_init_subtest "so-si"
 printf "\x0e\x0f" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "esc-tab"
+ts_init_subtest "esc-tab"
 printf "\e\t\b1\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "esc-backspace"
+ts_init_subtest "esc-backspace"
 printf "1\e\b2\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "cs_normal"
+ts_init_subtest "cs-normal"
 printf "<B\x10\x0E\t\v\x100" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "cs_alternate"
+ts_init_subtest "cs-alternate"
 printf "1\t\x0E2\n" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "allocate here"
+ts_init_subtest "allocate-here"
 printf "1\t\v2\t\n3" | ts_run $TS_CMD_COL >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "half line"
+ts_init_subtest "half-line"
 printf "\e\t\b1\n" | ts_run $TS_CMD_COL --fine >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
-ts_log "flushing"
+ts_init_subtest "flushing"
 seq 1 199 | ts_run $TS_CMD_COL --lines 8 >> $TS_OUTPUT 2>&1
+ts_finalize_subtest
 
 ts_finalize