Index: head/etc/mtree/BSD.tests.dist =================================================================== --- head/etc/mtree/BSD.tests.dist (revision 320929) +++ head/etc/mtree/BSD.tests.dist (revision 320930) @@ -1,736 +1,738 @@ # $FreeBSD$ # # Please see the file src/etc/mtree/README before making changes to this file. # /set type=dir uname=root gname=wheel mode=0755 . bin cat .. chmod .. date .. dd .. echo .. expr .. ln .. ls .. mv .. pax .. pkill .. pwait .. sh builtins .. errors .. execution .. expansion .. parameters .. parser .. set-e .. .. sleep .. test .. .. cddl lib .. sbin .. usr.bin .. usr.sbin dtrace common aggs .. arithmetic .. arrays .. assocs .. begin .. bitfields .. buffering .. builtinvar .. cg .. clauses .. cpc .. decls .. drops .. dtraceUtil .. end .. enum .. error .. exit .. fbtprovider .. funcs .. grammar .. include .. inline .. io .. ip .. java_api .. json .. lexer .. llquantize .. mdb .. mib .. misc .. multiaggs .. offsetof .. operators .. pid .. plockstat .. pointers .. pragma .. predicates .. preprocessor .. print .. printa .. printf .. privs .. probes .. proc .. profile-n .. providers .. raise .. rates .. safety .. scalars .. sched .. scripting .. sdt .. sizeof .. speculation .. stability .. stack .. stackdepth .. stop .. strlen .. strtoll .. struct .. sugar .. syscall .. sysevent .. tick-n .. trace .. tracemem .. translators .. typedef .. types .. uctf .. union .. usdt .. ustack .. vars .. version .. .. .. zfsd .. .. .. etc rc.d .. .. games .. gnu lib .. usr.bin diff .. .. .. lib atf libatf-c detail .. .. libatf-c++ detail .. .. test-programs .. .. libarchive .. libc c063 .. db .. gen execve .. posix_spawn .. .. hash data .. .. iconv .. inet .. locale .. net getaddrinfo data .. .. .. nss .. regex data .. .. resolv .. rpc .. ssp .. setjmp .. stdio .. stdlib .. string .. sys .. time .. tls dso .. .. termios .. ttyio .. .. libcam .. libcasper services cap_dns .. cap_grp .. cap_pwd .. cap_sysctl .. .. .. libcrypt .. libdevdctl .. libkvm .. libmp .. libnv .. libproc .. librt .. libsbuf .. libthr dlopen .. .. libutil .. libxo .. msun .. .. libexec atf atf-check .. atf-sh .. .. rtld-elf .. .. sbin dhclient .. devd .. growfs .. ifconfig .. mdconfig .. .. secure lib .. libexec .. usr.bin .. usr.sbin .. .. share examples tests atf .. plain .. tap .. .. .. zoneinfo .. .. sys acl .. aio .. fifo .. file .. fs tmpfs .. .. geom class concat .. eli .. gate .. gpt .. mirror .. nop .. raid3 .. shsec .. stripe .. uzip etalon .. .. .. .. kern acct .. execve .. pipe .. .. kqueue libkqueue .. .. mac bsdextended .. portacl .. .. mqueue .. netinet .. opencrypto .. pjdfstest chflags .. chmod .. chown .. ftruncate .. granular .. link .. mkdir .. mkfifo .. mknod .. open .. rename .. rmdir .. symlink .. truncate .. unlink .. utimensat .. .. posixshm .. sys .. vfs .. vm .. .. usr.bin apply .. basename .. bmake archives fmt_44bsd .. fmt_44bsd_mod .. fmt_oldbsd .. .. basic t0 .. t1 .. t2 .. t3 .. .. execution ellipsis .. empty .. joberr .. plus .. .. shell builtin .. meta .. path .. path_select .. replace .. select .. .. suffixes basic .. src_wild1 .. src_wild2 .. .. syntax directive-t0 .. enl .. funny-targets .. semi .. .. sysmk t0 2 1 .. .. mk .. .. t1 2 1 .. .. mk .. .. t2 2 1 .. .. mk .. .. .. variables modifier_M .. modifier_t .. opt_V .. t0 .. .. .. bsdcat .. calendar .. cmp .. compress .. cpio .. col .. comm .. csplit .. cut .. diff .. dirname .. du .. file2c .. getconf .. grep .. gzip .. + hexdump + .. ident .. indent .. join .. jot .. lastcomm .. limits .. m4 .. mkimg .. ncal .. opensm .. pr .. printf .. procstat .. sdiff .. sed regress.multitest.out .. .. soelim .. stat .. tail .. tar .. timeout .. tr .. truncate .. units .. uudecode .. uuencode .. uniq .. xargs .. xinstall .. xo .. yacc yacc .. .. .. usr.sbin chown .. etcupdate .. extattr .. fstyp .. makefs .. newsyslog .. nmtree .. pw .. rpcbind .. sa .. .. .. # vim: set expandtab ts=4 sw=4: Index: head/usr.bin/hexdump/Makefile =================================================================== --- head/usr.bin/hexdump/Makefile (revision 320929) +++ head/usr.bin/hexdump/Makefile (revision 320930) @@ -1,11 +1,17 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= hexdump SRCS= conv.c display.c hexdump.c hexsyntax.c odsyntax.c parse.c MAN= hexdump.1 od.1 MLINKS= hexdump.1 hd.1 LINKS= ${BINDIR}/hexdump ${BINDIR}/od LINKS+= ${BINDIR}/hexdump ${BINDIR}/hd + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Index: head/usr.bin/hexdump/tests/Makefile =================================================================== --- head/usr.bin/hexdump/tests/Makefile (nonexistent) +++ head/usr.bin/hexdump/tests/Makefile (revision 320930) @@ -0,0 +1,31 @@ +# $FreeBSD$ + +PACKAGE= tests + +ATF_TESTS_SH= hexdump_test + +${PACKAGE}FILES+= d_hexdump_a.in +${PACKAGE}FILES+= d_hexdump_b.in +${PACKAGE}FILES+= d_hexdump_c.in +${PACKAGE}FILES+= d_hexdump_bflag_a.out +${PACKAGE}FILES+= d_hexdump_bflag_b.out +${PACKAGE}FILES+= d_hexdump_bflag_c.out +${PACKAGE}FILES+= d_hexdump_cflag_a.out +${PACKAGE}FILES+= d_hexdump_cflag_b.out +${PACKAGE}FILES+= d_hexdump_cflag_c.out +${PACKAGE}FILES+= d_hexdump_dflag_a.out +${PACKAGE}FILES+= d_hexdump_dflag_b.out +${PACKAGE}FILES+= d_hexdump_dflag_c.out +${PACKAGE}FILES+= d_hexdump_nflag_a.out +${PACKAGE}FILES+= d_hexdump_oflag_a.out +${PACKAGE}FILES+= d_hexdump_oflag_b.out +${PACKAGE}FILES+= d_hexdump_oflag_c.out +${PACKAGE}FILES+= d_hexdump_sflag_a.out +${PACKAGE}FILES+= d_hexdump_UCflag_a.out +${PACKAGE}FILES+= d_hexdump_UCflag_b.out +${PACKAGE}FILES+= d_hexdump_UCflag_c.out +${PACKAGE}FILES+= d_hexdump_xflag_a.out +${PACKAGE}FILES+= d_hexdump_xflag_b.out +${PACKAGE}FILES+= d_hexdump_xflag_c.out + +.include Property changes on: head/usr.bin/hexdump/tests/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_UCflag_a.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_UCflag_a.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_UCflag_a.out (revision 320930) @@ -0,0 +1,2 @@ +00000000 54 65 73 74 0a |Test.| +00000005 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_UCflag_a.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_UCflag_b.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_UCflag_b.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_UCflag_b.out (revision 320930) @@ -0,0 +1,4 @@ +00000000 54 68 65 20 71 75 69 63 6b 20 62 72 6f 77 6e 20 |The quick brown | +00000010 66 6f 78 20 6a 75 6d 70 65 64 20 6f 76 65 72 20 |fox jumped over | +00000020 74 68 65 20 62 6c 75 65 20 68 6f 75 73 65 0a 0a |the blue house..| +00000030 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_UCflag_b.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_UCflag_c.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_UCflag_c.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_UCflag_c.out (revision 320930) @@ -0,0 +1,4 @@ +00000000 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 |AAAAAAAAAAAAAAAA| +* +00000020 41 41 41 41 41 41 41 0a |AAAAAAA.| +00000028 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_UCflag_c.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_a.in =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_a.in (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_a.in (revision 320930) @@ -0,0 +1 @@ +Test Property changes on: head/usr.bin/hexdump/tests/d_hexdump_a.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_b.in =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_b.in (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_b.in (revision 320930) @@ -0,0 +1,2 @@ +The quick brown fox jumped over the blue house + Property changes on: head/usr.bin/hexdump/tests/d_hexdump_b.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_bflag_a.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_bflag_a.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_bflag_a.out (revision 320930) @@ -0,0 +1,2 @@ +0000000 124 145 163 164 012 +0000005 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_bflag_a.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_bflag_b.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_bflag_b.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_bflag_b.out (revision 320930) @@ -0,0 +1,4 @@ +0000000 124 150 145 040 161 165 151 143 153 040 142 162 157 167 156 040 +0000010 146 157 170 040 152 165 155 160 145 144 040 157 166 145 162 040 +0000020 164 150 145 040 142 154 165 145 040 150 157 165 163 145 012 012 +0000030 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_bflag_b.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_bflag_c.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_bflag_c.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_bflag_c.out (revision 320930) @@ -0,0 +1,4 @@ +0000000 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 101 +* +0000020 101 101 101 101 101 101 101 012 +0000028 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_bflag_c.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_c.in =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_c.in (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_c.in (revision 320930) @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Property changes on: head/usr.bin/hexdump/tests/d_hexdump_c.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_cflag_a.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_cflag_a.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_cflag_a.out (revision 320930) @@ -0,0 +1,2 @@ +0000000 T e s t \n +0000005 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_cflag_a.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_cflag_b.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_cflag_b.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_cflag_b.out (revision 320930) @@ -0,0 +1,4 @@ +0000000 T h e q u i c k b r o w n +0000010 f o x j u m p e d o v e r +0000020 t h e b l u e h o u s e \n \n +0000030 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_cflag_b.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_cflag_c.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_cflag_c.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_cflag_c.out (revision 320930) @@ -0,0 +1,4 @@ +0000000 A A A A A A A A A A A A A A A A +* +0000020 A A A A A A A \n +0000028 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_cflag_c.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_dflag_a.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_dflag_a.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_a.out (revision 320930) @@ -0,0 +1,2 @@ +0000000 25940 29811 00010 +0000005 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_dflag_a.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_dflag_b.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_dflag_b.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_b.out (revision 320930) @@ -0,0 +1,4 @@ +0000000 26708 08293 30065 25449 08299 29282 30575 08302 +0000010 28518 08312 30058 28781 25701 28448 25974 08306 +0000020 26740 08293 27746 25973 26656 30063 25971 02570 +0000030 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_dflag_b.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out (revision 320930) @@ -0,0 +1,4 @@ +0000000 16705 16705 16705 16705 16705 16705 16705 16705 +* +0000020 16705 16705 16705 02625 +0000028 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_nflag_a.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_nflag_a.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_nflag_a.out (revision 320930) @@ -0,0 +1,2 @@ +0000000 124 +0000001 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_nflag_a.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_oflag_a.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_oflag_a.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_a.out (revision 320930) @@ -0,0 +1,2 @@ +0000000 062524 072163 000012 +0000005 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_oflag_a.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_oflag_b.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_oflag_b.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_b.out (revision 320930) @@ -0,0 +1,4 @@ +0000000 064124 020145 072561 061551 020153 071142 073557 020156 +0000010 067546 020170 072552 070155 062145 067440 062566 020162 +0000020 064164 020145 066142 062565 064040 072557 062563 005012 +0000030 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_oflag_b.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out (revision 320930) @@ -0,0 +1,4 @@ +0000000 040501 040501 040501 040501 040501 040501 040501 040501 +* +0000020 040501 040501 040501 005101 +0000028 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_sflag_a.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_sflag_a.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_sflag_a.out (revision 320930) @@ -0,0 +1,2 @@ +0000004 012 +0000005 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_sflag_a.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_xflag_a.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_xflag_a.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_a.out (revision 320930) @@ -0,0 +1,2 @@ +0000000 6554 7473 000a +0000005 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_xflag_a.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_xflag_b.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_xflag_b.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_b.out (revision 320930) @@ -0,0 +1,4 @@ +0000000 6854 2065 7571 6369 206b 7262 776f 206e +0000010 6f66 2078 756a 706d 6465 6f20 6576 2072 +0000020 6874 2065 6c62 6575 6820 756f 6573 0a0a +0000030 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_xflag_b.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out =================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out (nonexistent) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out (revision 320930) @@ -0,0 +1,4 @@ +0000000 4141 4141 4141 4141 4141 4141 4141 4141 +* +0000020 4141 4141 4141 0a41 +0000028 Property changes on: head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +d_hexdump_bflag_a.out \ No newline at end of property Index: head/usr.bin/hexdump/tests/hexdump_test.sh =================================================================== --- head/usr.bin/hexdump/tests/hexdump_test.sh (nonexistent) +++ head/usr.bin/hexdump/tests/hexdump_test.sh (revision 320930) @@ -0,0 +1,192 @@ +# +# Copyright (c) 2017 Kyle Evans +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +atf_test_case b_flag +b_flag_head() +{ + atf_set "descr" "Verify -b output" +} +b_flag_body() +{ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_bflag_a.out" \ + hexdump -b "$(atf_get_srcdir)/d_hexdump_a.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_bflag_b.out" \ + hexdump -b "$(atf_get_srcdir)/d_hexdump_b.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_bflag_c.out" \ + hexdump -b "$(atf_get_srcdir)/d_hexdump_c.in" +} + +atf_test_case c_flag +c_flag_head() +{ + atf_set "descr" "Verify -c output" +} +c_flag_body() +{ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_cflag_a.out" \ + hexdump -c "$(atf_get_srcdir)/d_hexdump_a.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_cflag_b.out" \ + hexdump -c "$(atf_get_srcdir)/d_hexdump_b.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_cflag_c.out" \ + hexdump -c "$(atf_get_srcdir)/d_hexdump_c.in" +} + +atf_test_case C_flag +C_flag_head() +{ + atf_set "descr" "Verify -C output" +} +C_flag_body() +{ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_a.out" \ + hexdump -C "$(atf_get_srcdir)/d_hexdump_a.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_b.out" \ + hexdump -C "$(atf_get_srcdir)/d_hexdump_b.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_c.out" \ + hexdump -C "$(atf_get_srcdir)/d_hexdump_c.in" +} + +atf_test_case hd_name +hd_name_head() +{ + atf_set "descr" "Verify hd output matching -C output" +} +hd_name_body() +{ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_a.out" \ + hd "$(atf_get_srcdir)/d_hexdump_a.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_b.out" \ + hd "$(atf_get_srcdir)/d_hexdump_b.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_UCflag_c.out" \ + hd "$(atf_get_srcdir)/d_hexdump_c.in" +} + +atf_test_case d_flag +d_flag_head() +{ + atf_set "descr" "Verify -d output" +} +d_flag_body() +{ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_a.out" \ + hexdump -d "$(atf_get_srcdir)/d_hexdump_a.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_b.out" \ + hexdump -d "$(atf_get_srcdir)/d_hexdump_b.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_c.out" \ + hexdump -d "$(atf_get_srcdir)/d_hexdump_c.in" +} + +atf_test_case n_flag +n_flag_head() +{ + atf_set "descr" "Check -n functionality" +} +n_flag_body() +{ + atf_check -o empty hexdump -bn 0 "$(atf_get_srcdir)/d_hexdump_a.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_nflag_a.out" \ + hexdump -bn 1 "$(atf_get_srcdir)/d_hexdump_a.in" +} + +atf_test_case o_flag +o_flag_head() +{ + atf_set "descr" "Verify -o output" +} +o_flag_body() +{ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_a.out" \ + hexdump -o "$(atf_get_srcdir)/d_hexdump_a.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_b.out" \ + hexdump -o "$(atf_get_srcdir)/d_hexdump_b.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_c.out" \ + hexdump -o "$(atf_get_srcdir)/d_hexdump_c.in" +} + +atf_test_case s_flag +s_flag_head() +{ + atf_set "descr" "Verify -s output" +} +s_flag_body() +{ + atf_expect_fail "-s option is currently broken due to capsicum (PR 219173)" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_sflag_a.out" \ + hexdump -bs 4 "$(atf_get_srcdir)/d_hexdump_a.in" + + atf_check -o not-empty hexdump -n 100 -s 1024 /dev/random +} + +atf_test_case v_flag +v_flag_head() +{ + atf_set "descr" "Verify -v functionality" +} +v_flag_body() +{ + atf_expect_fail "-s option is currently broken due to capsicum (PR 219173)" + for i in $(seq 0 7); do + atf_check -o match:"^\*$" \ + hexdump -s ${i} "$(atf_get_srcdir)/d_hexdump_c.in" + atf_check -o not-match:"^\*$" \ + hexdump -vs ${i} "$(atf_get_srcdir)/d_hexdump_c.in" + done + + atf_check -o not-match:"^\*$" \ + hexdump -s 8 "$(atf_get_srcdir)/d_hexdump_c.in" + atf_check -o not-match:"^\*$" \ + hexdump -vs 8 "$(atf_get_srcdir)/d_hexdump_c.in" +} + +atf_test_case x_flag +x_flag_head() +{ + atf_set "descr" "Verify -x output" +} +x_flag_body() +{ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_a.out" \ + hexdump -x "$(atf_get_srcdir)/d_hexdump_a.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_b.out" \ + hexdump -x "$(atf_get_srcdir)/d_hexdump_b.in" + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_c.out" \ + hexdump -x "$(atf_get_srcdir)/d_hexdump_c.in" +} + +atf_init_test_cases() +{ + atf_add_test_case b_flag + atf_add_test_case c_flag + atf_add_test_case C_flag + atf_add_test_case hd_name + atf_add_test_case d_flag + atf_add_test_case n_flag + atf_add_test_case o_flag + atf_add_test_case s_flag + atf_add_test_case v_flag + atf_add_test_case x_flag +} Property changes on: head/usr.bin/hexdump/tests/hexdump_test.sh ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property