payload: inscription("text/plain;charset=utf-8", [0b10000000]), ..Default::default() },], ); } #[test] fn no_endif() { let script = script::Builder::new() .push_opcode(opcodes::OP_FALSE) .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") .into_script(); assert_eq!( parse(&[Witness::from_slice(&[script.into_bytes(), Vec::new()])]), Vec::new(), ); } #[test] fn no_op_false() { let script = script::Builder::new() .push_opcode(opcodes::all::OP_IF) .push_slice(b"ord") .push_opcode(opcodes::all::OP_ENDIF) .into_script(); assert_eq!( parse(&[Witness::from_slice(&[script.into_bytes(), Vec::new()])]), Vec::new(), ); } #[test] fn empty_envelope() { assert_eq!(parse(&[envelope(&[])]), Vec::new()); } #[test] fn wrong_protocol_identifier() { assert_eq!(parse(&[envelope(&[b"foo"])]), Vec::new()); } #[test] fn extract_from_transaction() { assert_eq!( parse(&[envelope(&[