103 lines
1.5 KiB
Text
103 lines
1.5 KiB
Text
NAME=pf xxd=123
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
pf foo=xxd foo bar cow
|
|
pf.foo
|
|
pf.foo.foo
|
|
.pf.foo.foo=123
|
|
pf.foo.foo
|
|
pf.foo
|
|
EOF
|
|
EXPECT=<<EOF
|
|
foo : 0x00000000 = 0x00000000
|
|
bar : 0x00000004 = 0x00000000
|
|
cow : 0x00000008 = 0
|
|
foo : 0x00000000 = 0x00000000
|
|
foo : 0x00000000 = 0x0000007b
|
|
foo : 0x00000000 = 0x0000007b
|
|
bar : 0x00000004 = 0x00000000
|
|
cow : 0x00000008 = 0
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pf xxd.cow=123
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
pf foo=[2]xxd foo bar cow
|
|
pf.foo.cow
|
|
.pf.foo.cow=123
|
|
pf.foo.cow
|
|
EOF
|
|
EXPECT=<<EOF
|
|
cow : 0x0000000c = 0
|
|
cow : 0x0000000c = 123
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pf array with one write
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
pf foo=[3]x foo
|
|
.pf.foo.foo=1
|
|
pf.foo
|
|
EOF
|
|
EXPECT=<<EOF
|
|
foo : 0x00000000 = [ 0x00000001, 0x00000000, 0x00000000 ]
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pf array not in meta
|
|
FILE=-
|
|
BROKEN=1
|
|
CMDS=<<EOF
|
|
pf foo=[3]x foo
|
|
.pf.foo.foo=1
|
|
.pf*.foo
|
|
e asm.lines=0
|
|
pd 1
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000000 foo : 0x00000000 = [ 0x00000001, 0x00000000, 0x00000000 ]
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pf xxd print happy
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
pf foo=xxd foo bar cow
|
|
w hello happy world
|
|
e asm.lines=0
|
|
.pf*.foo
|
|
pd 3
|
|
EOF
|
|
EXPECT=<<EOF
|
|
;-- foo:
|
|
0x00000000 .dword 0x6c6c6568
|
|
;-- bar:
|
|
0x00000004 .dword 0x6168206f
|
|
;-- cow:
|
|
0x00000008 .dword 0x20797070
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pf xxd print
|
|
BROKEN=1
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
pf foo=[2]xxd foo bar cow
|
|
w hello happy world
|
|
e asm.lines=0
|
|
e asm.flags.inbytes=1
|
|
.pf*.foo
|
|
pd 3
|
|
EOF
|
|
EXPECT=<<EOF
|
|
;-- foo:
|
|
0x00000000 .qword 0x6168206f6c6c6568
|
|
;-- bar:
|
|
0x00000008 .dword 0x20797070
|
|
;-- cow:
|
|
0x0000000c .dword 0x6c726f77
|
|
EOF
|
|
RUN
|
|
|