File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,4 +97,63 @@ TestRegister.addTests([
9797 }
9898 ] ,
9999 } ,
100+ {
101+ name : "AMF3 Encode/Decode: object string" ,
102+ input : "{\"a\": \"test\"}" ,
103+ expectedMatch : / " \$ v a l u e " : " a " [ \s \S ] * " \$ v a l u e " : " t e s t " / ,
104+ recipeConfig : [
105+ {
106+ op : "AMF Encode" ,
107+ args : [ "AMF3" ]
108+ } ,
109+ {
110+ op : "AMF Decode" ,
111+ args : [ "AMF3" ]
112+ }
113+ ] ,
114+ } ,
115+ {
116+ name : "AMF3 Decode: empty input error" ,
117+ input : "" ,
118+ expectedOutput : "Could not decode AMF3 data: input is empty." ,
119+ recipeConfig : [
120+ {
121+ op : "AMF Decode" ,
122+ args : [ "AMF3" ]
123+ }
124+ ] ,
125+ } ,
126+ {
127+ name : "AMF3 Decode: newline input error" ,
128+ input : "\n" ,
129+ expectedOutput : "Could not decode AMF3 data. The input may be invalid or incomplete." ,
130+ recipeConfig : [
131+ {
132+ op : "AMF Decode" ,
133+ args : [ "AMF3" ]
134+ }
135+ ] ,
136+ } ,
137+ {
138+ name : "AMF3 Decode: truncated object input error" ,
139+ input : "\x0a\x13\x01\x03a\x05\x40\x08" ,
140+ expectedOutput : "Could not decode AMF3 data. The input may be invalid or incomplete." ,
141+ recipeConfig : [
142+ {
143+ op : "AMF Decode" ,
144+ args : [ "AMF3" ]
145+ }
146+ ] ,
147+ } ,
148+ {
149+ name : "AMF3 Decode: truncated array input error" ,
150+ input : "\x09\x13\x01\x03a\x05\x40\x08" ,
151+ expectedOutput : "Could not decode AMF3 data. The input may be invalid or incomplete." ,
152+ recipeConfig : [
153+ {
154+ op : "AMF Decode" ,
155+ args : [ "AMF3" ]
156+ }
157+ ] ,
158+ } ,
100159] ) ;
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments