mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-24 13:49:50 +00:00
Convert ONE_STREAM tests to EXPECT_ERR (#15979)
This commit is contained in:
parent
cf09972367
commit
20c642ceb3
@ -1037,8 +1037,7 @@ pd 1 @ 0x00400463
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=bin.str.enc alias and error handling
|
||||
ONE_STREAM=1
|
||||
NAME=bin.str.enc alias
|
||||
FILE=../bins/elf/strenc
|
||||
CMDS=<<EOF
|
||||
e asm.filter=false
|
||||
@ -1053,11 +1052,9 @@ e str.escbslash=true
|
||||
pd 1 @ 0x004016c0
|
||||
.(test_str.enc utf32-le)
|
||||
pd 1 @ 0x004016ed
|
||||
.(test_str.enc cat_sat_on_keyboard)
|
||||
?e
|
||||
.(test_str.enc UTF32BE)
|
||||
.(test_str.enc UTF16-LE)
|
||||
.(test_str.enc CAT_SAT_ON_KEYBOARD)
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
guess
|
||||
@ -1066,13 +1063,30 @@ utf16le
|
||||
0x004016c0 mov edi, 0x40230c ; u"\u2520\u2542\u2500\u2500\u2542\u2528 is a fence with embedded zeros\n"
|
||||
utf32le
|
||||
0x004016ed mov edi, 0x40258c ; U"utf32le> \\u00a2\\u20ac\\U00010348 in cyan:\x1b[36m \xa2\u20ac\U00010348 \x1b[0m\n"
|
||||
Unknown encoding: cat_sat_on_keyboard
|
||||
utf32le
|
||||
|
||||
utf32be
|
||||
utf16le
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=bin.str.enc error handling
|
||||
# Unbreak this and r2r.v goes XX
|
||||
BROKEN=1
|
||||
FILE=-
|
||||
CMDS=<<EOF
|
||||
(test_str.enc enc, e bin.str.enc=$0, e bin.str.enc)
|
||||
.(test_str.enc UTF-32LE)
|
||||
.(test_str.enc cat_sat_on_keyboard)
|
||||
.(test_str.enc CAT_SAT_ON_KEYBOARD)
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
utf32le
|
||||
utf32le
|
||||
utf32le
|
||||
EOF
|
||||
EXPECT_ERR=<<EOF
|
||||
Unknown encoding: cat_sat_on_keyboard
|
||||
Unknown encoding: CAT_SAT_ON_KEYBOARD
|
||||
utf16le
|
||||
EOF
|
||||
RUN
|
||||
|
||||
|
@ -455,20 +455,23 @@ RUN
|
||||
|
||||
NAME=pf?
|
||||
FILE=-
|
||||
ONE_STREAM=1
|
||||
CMDS=<<EOF
|
||||
pfo elf32
|
||||
pf?elf_header
|
||||
pf? elf_header
|
||||
pf?pe_header
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
?[2]E[2]E[4]Exxxxwwwwww (elf_ident)ident (elf_type)type (elf_machine)machine (elf_obj_version)version entry phoff shoff flags ehsize phentsize phnum shentsize shnum shstrndx
|
||||
?[2]E[2]E[4]Exxxxwwwwww (elf_ident)ident (elf_type)type (elf_machine)machine (elf_obj_version)version entry phoff shoff flags ehsize phentsize phnum shentsize shnum shstrndx
|
||||
Struct pe_header is not defined
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=pf? struct not defined
|
||||
FILE=-
|
||||
CMDS=pf?cat_sat_on_keyboard
|
||||
EXPECT_ERR=Struct cat_sat_on_keyboard is not defined
|
||||
RUN
|
||||
|
||||
NAME=-nn filename with @
|
||||
FILE=../bins/elf/analysis/tiny1@invalid_addr
|
||||
ARGS=-nn
|
||||
|
@ -49,7 +49,6 @@ RUN
|
||||
|
||||
NAME=@@= `prz` fix
|
||||
FILE=-
|
||||
ONE_STREAM=1
|
||||
CMDS=<<EOF
|
||||
e asm.arch=x86
|
||||
e asm.bits=64
|
||||
@ -62,4 +61,6 @@ EXPECT=<<EOF
|
||||
0x00000003 2033 and byte [rbx], dh
|
||||
0x00000004 3320 xor esp, dword [rax]
|
||||
EOF
|
||||
EXPECT_ERR=<<EOF
|
||||
EOF
|
||||
RUN
|
||||
|
@ -89,13 +89,6 @@ EXPECT=<<EOF
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=ONE_STREAM sets scr.onestream
|
||||
FILE=-
|
||||
ONE_STREAM=1
|
||||
CMDS=e scr.onestream
|
||||
EXPECT=true
|
||||
RUN
|
||||
|
||||
NAME=no-nl-at-eof script
|
||||
FILE=-
|
||||
CMDS=!radare2 -i scripts/no-nl-at-eof.r2 -NQ -
|
||||
|
29
test/new/db/tools/r2r
Normal file
29
test/new/db/tools/r2r
Normal file
@ -0,0 +1,29 @@
|
||||
NAME=Only EXPECT_ERR<<EOF
|
||||
# Unbreak this and r2r.v goes XX
|
||||
BROKEN=1
|
||||
FILE=-
|
||||
CMDS=<<EOF
|
||||
pf?cat_sat_on_keyboard
|
||||
pf?CAT_SAT_ON_KEYBOARD
|
||||
EOF
|
||||
EXPECT_ERR=<<EOF
|
||||
Struct cat_sat_on_keyboard is not defined
|
||||
Struct CAT_SAT_ON_KEYBOARD is not defined
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=EXPECT<<EOF empty and EXPECT_ERR<<EOF non-empty
|
||||
# Unbreak this and r2r.v goes XX
|
||||
BROKEN=1
|
||||
FILE=-
|
||||
CMDS=<<EOF
|
||||
pf?cat_sat_on_keyboard
|
||||
pf?CAT_SAT_ON_KEYBOARD
|
||||
EOF
|
||||
EXPECT=<<EOF
|
||||
EOF
|
||||
EXPECT_ERR=<<EOF
|
||||
Struct cat_sat_on_keyboard is not defined
|
||||
Struct CAT_SAT_ON_KEYBOARD is not defined
|
||||
EOF
|
||||
RUN
|
Loading…
Reference in New Issue
Block a user