This commit adds several tests to the script_invalid.json data which
exercise some edge conditions that are not currently being tested.
These are mainly being added to cover several cases a branch coverage
analysis of btcd showed are not already being covered, but given more
tests of edge conditions are always a good thing, I'm contributing
them upstream.
["2 2 0 IF LSHIFT ELSE 1 ENDIF","NOP","P2SH,STRICTENC","LSHIFT disabled"],
["2 2 0 IF RSHIFT ELSE 1 ENDIF","NOP","P2SH,STRICTENC","RSHIFT disabled"],
["","EQUAL NOT","P2SH,STRICTENC","EQUAL must error when there are no stack items"],
["0","EQUAL NOT","P2SH,STRICTENC","EQUAL must error when there are not 2 stack items"],
["0 1","EQUAL","P2SH,STRICTENC"],
["1 1 ADD","0 EQUAL","P2SH,STRICTENC"],
["11 1 ADD 12 SUB","11 EQUAL","P2SH,STRICTENC"],
@ -368,6 +370,16 @@
["NOP","HASH160 1","P2SH,STRICTENC"],
["NOP","HASH256 1","P2SH,STRICTENC"],
["Increase CHECKSIG and CHECKMULTISIG negative test coverage"],
["","CHECKSIG NOT","STRICTENC","CHECKSIG must error when there are no stack items"],
["0","CHECKSIG NOT","STRICTENC","CHECKSIG must error when there are not 2 stack items"],
["","CHECKMULTISIG NOT","STRICTENC","CHECKMULTISIG must error when there are no stack items"],
["","-1 CHECKMULTISIG NOT","STRICTENC","CHECKMULTISIG must error when the specified number of pubkeys is negative"],
["","1 CHECKMULTISIG NOT","STRICTENC","CHECKMULTISIG must error when there are not enough pubkeys on the stack"],
["","-1 0 CHECKMULTISIG NOT","STRICTENC","CHECKMULTISIG must error when the specified number of signatures is negative"],
["","1 'pk1' 1 CHECKMULTISIG NOT","STRICTENC","CHECKMULTISIG must error when there are not enough signatures on the stack"],
["","'dummy' 'sig1' 1 'pk1' 1 CHECKMULTISIG IF 1 ENDIF","","CHECKMULTISIG must push false to stack when signature is invalid when NOT in strict enc mode"],