Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/bin/dd Add swab tests from RVP.
details: https://anonhg.NetBSD.org/src/rev/986a809d8819
branches: trunk
changeset: 1024030:986a809d8819
user: christos <christos%NetBSD.org@localhost>
date: Fri Oct 08 14:45:07 2021 +0000
description:
Add swab tests from RVP.
diffstat:
tests/bin/dd/t_dd.sh | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diffs (36 lines):
diff -r 783ddf1bfc07 -r 986a809d8819 tests/bin/dd/t_dd.sh
--- a/tests/bin/dd/t_dd.sh Fri Oct 08 14:44:48 2021 +0000
+++ b/tests/bin/dd/t_dd.sh Fri Oct 08 14:45:07 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_dd.sh,v 1.1 2012/03/17 16:33:11 jruoho Exp $
+# $NetBSD: t_dd.sh,v 1.2 2021/10/08 14:45:07 christos Exp $
#
# Copyright (c) 2007 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -122,9 +122,26 @@
atf_check_equal $st_size 8
}
+atf_test_case swab
+swab_head() {
+ atf_set "descr" "Tests conv=swab"
+}
+
+swab_body() {
+ echo -n abcdefgh > testfile
+ atf_check -s exit:0 -e ignore -o inline:badcfehg \
+ dd if=testfile conv=swab msgfmt=quiet
+ atf_check -s exit:0 -e ignore -o inline:abcdefgh \
+ dd if=testfile conv=swab msgfmt=quiet bs=1
+ for i in 2 4 8; do
+ atf_check -s exit:0 -e ignore -o inline:badcfehg \
+ dd if=testfile conv=swab msgfmt=quiet bs=$i
+ done
+}
atf_init_test_cases()
{
atf_add_test_case length
atf_add_test_case io
atf_add_test_case seek
+ atf_add_test_case swab
}
Home |
Main Index |
Thread Index |
Old Index