aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2023-05-25 23:48:13 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2023-05-25 23:48:13 +0200
commit0c3270f7e55e0ca7b8d664851468511d2c8995cf (patch)
treefdaf00c6f2db56cab992eec0d556b3ef0db61381 /testsuite
parent6882a933cf078be35f4eb93963365549d43cb497 (diff)
downloadbusybox-w32-0c3270f7e55e0ca7b8d664851468511d2c8995cf.tar.gz
busybox-w32-0c3270f7e55e0ca7b8d664851468511d2c8995cf.tar.bz2
busybox-w32-0c3270f7e55e0ca7b8d664851468511d2c8995cf.zip
od: stop printing extra trailing spaces
function old new delta .rodata 104598 104613 +15 display 1475 1485 +10 od_main 549 556 +7 rewrite 971 967 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 32/-4) Total: 28 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/od.tests43
1 files changed, 19 insertions, 24 deletions
diff --git a/testsuite/od.tests b/testsuite/od.tests
index 29ca829d5..4b1525620 100755
--- a/testsuite/od.tests
+++ b/testsuite/od.tests
@@ -12,14 +12,9 @@ le=false
12{ printf '\0\1' | od -s | grep -q 256; } && le=true 12{ printf '\0\1' | od -s | grep -q 256; } && le=true
13readonly le 13readonly le
14 14
15# NB: for !DESKTOP,
16# sed 's/ *$//' truncates trailing spaces.
17# This needs to be fixed properly (by not outputting them).
18# For now, the tests ignore them (do not require a match).
19
20optional !DESKTOP 15optional !DESKTOP
21testing "od -a (!DESKTOP)" \ 16testing "od -a (!DESKTOP)" \
22 "od -a | sed 's/ *$//'" \ 17 "od -a" \
23"\ 18"\
240000000 soh stx etx lf A B C fe 190000000 soh stx etx lf A B C fe
250000010 200000010
@@ -39,7 +34,7 @@ testing "od -a (DESKTOP)" \
39SKIP= 34SKIP=
40 35
41testing "od -B" \ 36testing "od -B" \
42 "od -B | sed 's/ *$//'" \ 37 "od -B" \
43"\ 38"\
440000000 001001 005003 041101 177103 390000000 001001 005003 041101 177103
450000010 400000010
@@ -49,7 +44,7 @@ SKIP=
49 44
50$le || SKIP=1 45$le || SKIP=1
51testing "od -o (little-endian)" \ 46testing "od -o (little-endian)" \
52 "od -o | sed 's/ *$//'" \ 47 "od -o" \
53"\ 48"\
540000000 001001 005003 041101 177103 490000000 001001 005003 041101 177103
550000010 500000010
@@ -58,7 +53,7 @@ testing "od -o (little-endian)" \
58SKIP= 53SKIP=
59 54
60testing "od -b" \ 55testing "od -b" \
61 "od -b | sed 's/ *$//'" \ 56 "od -b" \
62"\ 57"\
630000000 001 002 003 012 101 102 103 376 580000000 001 002 003 012 101 102 103 376
640000010 590000010
@@ -67,7 +62,7 @@ testing "od -b" \
67SKIP= 62SKIP=
68 63
69testing "od -c" \ 64testing "od -c" \
70 "od -c | sed 's/ *$//'" \ 65 "od -c" \
71"\ 66"\
720000000 001 002 003 \\\\n A B C 376 670000000 001 002 003 \\\\n A B C 376
730000010 680000010
@@ -77,7 +72,7 @@ SKIP=
77 72
78$le || SKIP=1 73$le || SKIP=1
79testing "od -d (little-endian)" \ 74testing "od -d (little-endian)" \
80 "od -d | sed 's/ *$//'" \ 75 "od -d" \
81"\ 76"\
820000000 513 2563 16961 65091 770000000 513 2563 16961 65091
830000010 780000010
@@ -88,7 +83,7 @@ SKIP=
88optional !DESKTOP #DESKTOP: unrecognized option: D 83optional !DESKTOP #DESKTOP: unrecognized option: D
89$le || SKIP=1 84$le || SKIP=1
90testing "od -D (!DESKTOP little-endian)" \ 85testing "od -D (!DESKTOP little-endian)" \
91 "od -D | sed 's/ *$//'" \ 86 "od -D" \
92"\ 87"\
930000000 167969281 4265820737 880000000 167969281 4265820737
940000010 890000010
@@ -99,7 +94,7 @@ SKIP=
99optional !DESKTOP #DESKTOP: unrecognized option: e 94optional !DESKTOP #DESKTOP: unrecognized option: e
100$le || SKIP=1 95$le || SKIP=1
101testing "od -e (!DESKTOP little-endian)" \ 96testing "od -e (!DESKTOP little-endian)" \
102 "od -e | sed 's/ *$//'" \ 97 "od -e" \
103"\ 98"\
1040000000 -1.61218556514036e+300 990000000 -1.61218556514036e+300
1050000010 1000000010
@@ -110,7 +105,7 @@ SKIP=
110optional !DESKTOP #DESKTOP: unrecognized option: F 105optional !DESKTOP #DESKTOP: unrecognized option: F
111$le || SKIP=1 106$le || SKIP=1
112testing "od -F (!DESKTOP little-endian)" \ 107testing "od -F (!DESKTOP little-endian)" \
113 "od -F | sed 's/ *$//'" \ 108 "od -F" \
114"\ 109"\
1150000000 -1.61218556514036e+300 1100000000 -1.61218556514036e+300
1160000010 1110000010
@@ -120,7 +115,7 @@ SKIP=
120 115
121$le || SKIP=1 116$le || SKIP=1
122testing "od -f (little-endian)" \ 117testing "od -f (little-endian)" \
123 "od -f | sed 's/ *$//'" \ 118 "od -f" \
124"\ 119"\
1250000000 6.3077975e-33 -6.4885867e+37 1200000000 6.3077975e-33 -6.4885867e+37
1260000010 1210000010
@@ -131,7 +126,7 @@ SKIP=
131optional !DESKTOP #DESKTOP: unrecognized option: H 126optional !DESKTOP #DESKTOP: unrecognized option: H
132$le || SKIP=1 127$le || SKIP=1
133testing "od -H (!DESKTOP little-endian)" \ 128testing "od -H (!DESKTOP little-endian)" \
134 "od -H | sed 's/ *$//'" \ 129 "od -H" \
135"\ 130"\
1360000000 0a030201 fe434241 1310000000 0a030201 fe434241
1370000010 1320000010
@@ -142,7 +137,7 @@ SKIP=
142optional !DESKTOP #DESKTOP: unrecognized option: X 137optional !DESKTOP #DESKTOP: unrecognized option: X
143$le || SKIP=1 138$le || SKIP=1
144testing "od -X (!DESKTOP little-endian)" \ 139testing "od -X (!DESKTOP little-endian)" \
145 "od -X | sed 's/ *$//'" \ 140 "od -X" \
146"\ 141"\
1470000000 0a030201 fe434241 1420000000 0a030201 fe434241
1480000010 1430000010
@@ -152,7 +147,7 @@ SKIP=
152 147
153$le || SKIP=1 148$le || SKIP=1
154testing "od -h (little-endian)" \ 149testing "od -h (little-endian)" \
155 "od -h | sed 's/ *$//'" \ 150 "od -h" \
156"\ 151"\
1570000000 0201 0a03 4241 fe43 1520000000 0201 0a03 4241 fe43
1580000010 1530000010
@@ -162,7 +157,7 @@ SKIP=
162 157
163$le || SKIP=1 158$le || SKIP=1
164testing "od -x (little-endian)" \ 159testing "od -x (little-endian)" \
165 "od -x | sed 's/ *$//'" \ 160 "od -x" \
166"\ 161"\
1670000000 0201 0a03 4241 fe43 1620000000 0201 0a03 4241 fe43
1680000010 1630000010
@@ -173,7 +168,7 @@ SKIP=
173optional !DESKTOP #DESKTOP: unrecognized option: I 168optional !DESKTOP #DESKTOP: unrecognized option: I
174$le || SKIP=1 169$le || SKIP=1
175testing "od -I (!DESKTOP little-endian)" \ 170testing "od -I (!DESKTOP little-endian)" \
176 "od -I | sed 's/ *$//'" \ 171 "od -I" \
177"\ 172"\
1780000000 -125183517527965183 1730000000 -125183517527965183
1790000010 1740000010
@@ -184,7 +179,7 @@ SKIP=
184optional !DESKTOP #DESKTOP: unrecognized option: L 179optional !DESKTOP #DESKTOP: unrecognized option: L
185$le || SKIP=1 180$le || SKIP=1
186testing "od -L (!DESKTOP little-endian)" \ 181testing "od -L (!DESKTOP little-endian)" \
187 "od -L | sed 's/ *$//'" \ 182 "od -L" \
188"\ 183"\
1890000000 -125183517527965183 1840000000 -125183517527965183
1900000010 1850000010
@@ -194,7 +189,7 @@ SKIP=
194 189
195$le || SKIP=1 190$le || SKIP=1
196testing "od -i (little-endian)" \ 191testing "od -i (little-endian)" \
197 "od -i | sed 's/ *$//'" \ 192 "od -i" \
198"\ 193"\
1990000000 167969281 -29146559 1940000000 167969281 -29146559
2000000010 1950000010
@@ -205,7 +200,7 @@ SKIP=
205optional !DESKTOP #DESKTOP: unrecognized option: O 200optional !DESKTOP #DESKTOP: unrecognized option: O
206$le || SKIP=1 201$le || SKIP=1
207testing "od -O (!DESKTOP little-endian)" \ 202testing "od -O (!DESKTOP little-endian)" \
208 "od -O | sed 's/ *$//'" \ 203 "od -O" \
209"\ 204"\
2100000000 01200601001 37620641101 2050000000 01200601001 37620641101
2110000010 2060000010
@@ -216,7 +211,7 @@ SKIP=
216# This probably also depends on word width of the arch (what is "long"?) 211# This probably also depends on word width of the arch (what is "long"?)
217$le || SKIP=1 212$le || SKIP=1
218testing "od -l (little-endian)" \ 213testing "od -l (little-endian)" \
219 "od -l | sed 's/ *$//'" \ 214 "od -l" \
220"\ 215"\
2210000000 -125183517527965183 2160000000 -125183517527965183
2220000010 2170000010