[git commit] od: make -B test little endian only, add variant for big endian

Denys Vlasenko vda.linux at googlemail.com
Tue Jul 1 11:34:12 UTC 2025


commit: https://git.busybox.net/busybox/commit/?id=b8ce2084cdb95bd77afc93fe0ccb270ba12139f8
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Radoslav Kolev <radoslav.kolev at suse.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 testsuite/od.tests | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/testsuite/od.tests b/testsuite/od.tests
index 4f245a7e8..c863bf2e8 100755
--- a/testsuite/od.tests
+++ b/testsuite/od.tests
@@ -61,7 +61,8 @@ testing "od -a (DESKTOP)" \
 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
 SKIP=
 
-testing "od -B" \
+$little_endian || SKIP=1
+testing "od -B (little-endian)" \
         "od -B" \
 "\
 0000000 001001 005003 041101 177103
@@ -70,6 +71,16 @@ testing "od -B" \
 	"" "$input"
 SKIP=
 
+$little_endian && SKIP=1
+testing "od -B (big-endian)" \
+        "od -B" \
+"\
+0000000 000402 001412 040502 041776
+0000010
+" \
+       "" "$input"
+SKIP=
+
 $little_endian || SKIP=1
 testing "od -o (little-endian)" \
         "od -o" \


More information about the busybox-cvs mailing list