commit: 067a8fb175199502c11a0dc96f513477a908492f parent 3e27c0b69e0d681e76f75e1336b1dd54738e4255 Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me> Date: Sun, 30 Jan 2022 14:36:25 +0100 test-bin/strings: Add tests on `-n 8` optionDiffstat:
A | test-bin/outputs/strings/true_8 | 65 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
M | test-bin/strings | 19 | +++++++++++++++++++ |
2 files changed, 84 insertions(+), 0 deletions(-)
diff --git a/test-bin/outputs/strings/true_8 b/test-bin/outputs/strings/true_8 @@ -0,0 +1,65 @@ +/lib64/ld-linux-x86-64.so.2 +__cxa_finalize +__libc_start_main +libc.so.6 +GLIBC_2.2.5 +_ITM_deregisterTMCloneTable +__gmon_start__ +_ITM_registerTMCloneTable +[]A\A]A^A_ +GCC: (Gentoo Hardened 10.3.0-r2 p3) 10.3.0 +GCC: (Gentoo Hardened 11.2.0 p1) 11.2.0 +/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include +elf-init.c +stddef.h +GNU C99 11.2.0 -mtune=generic -march=x86-64 -g -O2 -std=c99 +long long int +GNU C11 10.3.0 -march=znver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mmovbe -maes -msha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-sgx -mbmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mmwaitx -mclzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-avx512vpopcntdq -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite -mno-avx512bf16 -mno-enqcmd -mno-avx512vp2intersect --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=512 -mtune=znver1 -m64 -ggdb -ggdb -O2 -O2 -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fstack-protector-strong -fmath-errno -fno-stack-protector -fPIC -fstack-protector-strong -ftls-model=initial-exec +__init_array_start +/var/tmp/portage/sys-libs/glibc-2.33-r7/work/glibc-2.33/csu +elf-init.c +long unsigned int +__libc_csu_fini +__libc_csu_init +long double +__init_array_end +/home/haelwenn/Sources/git/hacktivis.me/git/utils/bin +elf-init.c +__init_array_end +_DYNAMIC +__init_array_start +__GNU_EH_FRAME_HDR +_GLOBAL_OFFSET_TABLE_ +__libc_csu_fini +_ITM_deregisterTMCloneTable +__libc_start_main@GLIBC_2.2.5 +__data_start +__gmon_start__ +__dso_handle +_IO_stdin_used +__libc_csu_init +__bss_start +__TMC_END__ +_ITM_registerTMCloneTable +__cxa_finalize@GLIBC_2.2.5 +.shstrtab +.note.ABI-tag +.gnu.hash +.gnu.version +.gnu.version_r +.rela.dyn +.plt.got +.eh_frame_hdr +.eh_frame +.init_array +.fini_array +.dynamic +.comment +.debug_aranges +.debug_info +.debug_abbrev +.debug_line +.debug_str +.debug_loc +.debug_line_str +.debug_rnglists diff --git a/test-bin/strings b/test-bin/strings @@ -29,6 +29,21 @@ truedashinput_body() { atf_check -o file:outputs/strings/true ../bin/strings - <inputs/strings/true } +atf_test_case true8file +true8file_body() { + atf_check -o file:outputs/strings/true_8 ../bin/strings -n 8 inputs/strings/true +} + +atf_test_case true8input +true8input_body() { + atf_check -o file:outputs/strings/true_8 ../bin/strings -n 8 <inputs/strings/true +} + +atf_test_case true8dashinput +true8dashinput_body() { + atf_check -o file:outputs/strings/true_8 ../bin/strings -n 8 - <inputs/strings/true +} + atf_test_case nullfile nullfile_body() { atf_check ../bin/strings /dev/null @@ -54,6 +69,10 @@ atf_init_test_cases() { atf_add_test_case trueinput atf_add_test_case truedashinput + atf_add_test_case true8file + atf_add_test_case true8input + atf_add_test_case true8dashinput + atf_add_test_case nullfile atf_add_test_case nullinput atf_add_test_case nulldashinput