mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 21:29:49 +00:00
107 lines
2.0 KiB
Plaintext
107 lines
2.0 KiB
Plaintext
NAME=pFb.test simple protobuf
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
wx 0a 2e 0a 07 56 69 6e 63 65 6e 74 10 09 1a 10 56 69 6e 63 65 6e 74 40 74 65 73 74 2e 63 6f 6d 22 0f 0a 0b 31 35 30 31 31 31 31 31 31 31 31 10 02
|
|
pFb
|
|
EOF
|
|
EXPECT=<<EOF
|
|
1 {
|
|
1: "Vincent"
|
|
2: 9 | 9
|
|
3: "Vincent@test.com"
|
|
4 {
|
|
1: "15011111111"
|
|
2: 2 | 2
|
|
}
|
|
}
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pFb.test simple protobuf (verbose)
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
wx 0a 2e 0a 07 56 69 6e 63 65 6e 74 10 09 1a 10 56 69 6e 63 65 6e 74 40 74 65 73 74 2e 63 6f 6d 22 0f 0a 0b 31 35 30 31 31 31 31 31 31 31 31 10 02
|
|
pFbv
|
|
EOF
|
|
EXPECT=<<EOF
|
|
1 [LEN_DELIM] {
|
|
1 [LEN_DELIM] : "Vincent"
|
|
2 [VARINT] : 9 | 9
|
|
3 [LEN_DELIM] : "Vincent@test.com"
|
|
4 [LEN_DELIM] {
|
|
1 [LEN_DELIM] : "15011111111"
|
|
2 [VARINT] : 2 | 2
|
|
}
|
|
}
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pFbj.test simple protobuf (json)
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
wx 0a 2e 0a 07 56 69 6e 63 65 6e 74 10 09 1a 10 56 69 6e 63 65 6e 74 40 74 65 73 74 2e 63 6f 6d 22 0f 0a 0b 31 35 30 31 31 31 31 31 31 31 31 10 02
|
|
pFbj~{}
|
|
EOF
|
|
EXPECT=<<EOF
|
|
{
|
|
"protobuf": [
|
|
[
|
|
"Vincent",
|
|
9,
|
|
"Vincent@test.com",
|
|
[
|
|
"15011111111",
|
|
2
|
|
]
|
|
]
|
|
]
|
|
}
|
|
EOF
|
|
RUN
|
|
|
|
|
|
NAME=pFbJ.test simple protobuf (quiet json)
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
wx 0a 2e 0a 07 56 69 6e 63 65 6e 74 10 09 1a 10 56 69 6e 63 65 6e 74 40 74 65 73 74 2e 63 6f 6d 22 0f 0a 0b 31 35 30 31 31 31 31 31 31 31 31 10 02
|
|
pFbJ~{}
|
|
EOF
|
|
EXPECT=<<EOF
|
|
{
|
|
"type": "array",
|
|
"values": [
|
|
{
|
|
"type": "array",
|
|
"values": [
|
|
{
|
|
"type": "len-delim",
|
|
"value": "Vincent"
|
|
},
|
|
{
|
|
"type": "varint",
|
|
"value": 9
|
|
},
|
|
{
|
|
"type": "len-delim",
|
|
"value": "Vincent@test.com"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"values": [
|
|
{
|
|
"type": "len-delim",
|
|
"value": "15011111111"
|
|
},
|
|
{
|
|
"type": "varint",
|
|
"value": 2
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
EOF
|
|
RUN
|