vec![ParsedEnvelope { payload: inscription("text/plain;charset=utf-8", "ord"), ..Default::default() }], ); } #[test] fn valid_ignore_preceding() { let script = script::Builder::new() .push_opcode(opcodes::all::OP_CHECKSIG) .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") .push_slice([1]) .push_slice(b"text/plain;charset=utf-8") .push_slice([]) .push_slice(b"ord") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); assert_eq!( parse(&[Witness::from_slice(&[script.into_bytes(), Vec::new()])]), vec![ParsedEnvelope { payload: inscription("text/plain;charset=utf-8", "ord"), ..Default::default() }], ); } #[test] fn multiple_inscriptions_in_a_single_witness() { let script = script::Builder::new() .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") .push_slice([1]) .push_slice(b"text/plain;charset=utf-8")