diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2014-03-12 15:12:08 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2014-03-12 15:12:08 -0400 |
commit | ca0b8acbf38a02f39e313a1c633d577f9bf7d983 (patch) | |
tree | a29b47dec1bb2a33a3801138436c5603cadd83c3 | |
parent | 1725e6a01f7fcfb20a4ca256e4e764ff6fe4f126 (diff) | |
parent | ffd082a6a36bf0b85078be8400b8eda3630b34b3 (diff) |
Merge pull request #3841 from schildbach/script-tests-OP_0
Add script test to prove that OP_0 evaluates as the empty vector.
-rw-r--r-- | src/test/data/script_invalid.json | 4 | ||||
-rw-r--r-- | src/test/data/script_valid.json | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json index 761cc4a008..8cb365a46f 100644 --- a/src/test/data/script_invalid.json +++ b/src/test/data/script_invalid.json @@ -325,5 +325,7 @@ ["NOP1 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL"], ["0 0x01 0x50", "HASH160 0x14 0xece424a6bb6ddf4db592c0faed60685047a361b1 EQUAL", "OP_RESERVED in P2SH should fail"], -["0 0x01 VER", "HASH160 0x14 0x0f4d7845db968f2a81b530b6f3c1d6246d4c7e01 EQUAL", "OP_VER in P2SH should fail"] +["0 0x01 VER", "HASH160 0x14 0x0f4d7845db968f2a81b530b6f3c1d6246d4c7e01 EQUAL", "OP_VER in P2SH should fail"], + +["0x00", "'00' EQUAL", "Basic OP_0 execution"] ] diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json index e4c181cae8..3b4c191865 100644 --- a/src/test/data/script_valid.json +++ b/src/test/data/script_valid.json @@ -411,5 +411,7 @@ ["0x4c 0x40 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242", "0x4d 0x4000 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242 EQUAL", -"Basic PUSHDATA1 signedness check"] +"Basic PUSHDATA1 signedness check"], + +["0x00", "SIZE 0 EQUAL", "Basic OP_0 execution"] ] |