Skip to content

Commit aa7c92e

Browse files
committed
Add test cases for OP_SUBSTR_LAZY
Signed-off-by: Steven Roose <[email protected]>
1 parent 547d3a0 commit aa7c92e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/data/script_tests.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2728,5 +2728,11 @@
27282728

27292729
["0x46 0x304402206daa2cecefaa8930244efea8d8e6db945161a2040d48f67542b5f9cdc592110202204b83b83ad3d3a2359c36b6c4f57306de46246e5cd321c6bd5881df4ff319cda9", "0x03 0x776174 0x21 0x0292408c54f68eb7609ac8b1ac234192a1f5a5706b37854bcecf51ddd8b202885c CHECKSIGFROMSTACK", "", "OK"],
27302730

2731+
["these arguments are not allowed in SUBSTR, but are in SUBSTR_LAZY:"],
2732+
["0x08 0x0102030405060708", "-1 7 SUBSTR_LAZY 0x07 0x01020304050607 EQUAL", "", "OK", "SUBSTR: -1 is not allowed"],
2733+
["0x08 0x0102030405060708", "1 -7 SUBSTR_LAZY 0x00 EQUAL", "", "OK", "SUBSTR: -1 is not allowed"],
2734+
["0x08 0x0102030405060708", "9 1 SUBSTR_LAZY 0x00 EQUAL", "", "OK", "SUBSTR: range exceeds length"],
2735+
["0x08 0x0102030405060708", "0 9 SUBSTR_LAZY 0x08 0x0102030405060708 EQUAL", "", "OK", "SUBSTR: ange exceeds length"],
2736+
27312737
["The End"]
27322738
]

0 commit comments

Comments
 (0)