From eb2995dd3bee5a79b4d3db84a37eaa45d0a17884 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 29 Dec 2023 21:56:31 -0500 Subject: [PATCH] Support list with empty string as only element for empty list. --- src/wasm_test/compare.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wasm_test/compare.rs b/src/wasm_test/compare.rs index f4f97c5..680303f 100644 --- a/src/wasm_test/compare.rs +++ b/src/wasm_test/compare.rs @@ -411,7 +411,7 @@ pub(crate) fn wasm_get_emacs_standard_properties( fn wasm_compare_list<'e, 's: 'e, 'w, EI, WI>( source: &'s str, - emacs: EI, + mut emacs: EI, wasm: WI, ) -> Result, Box> where @@ -420,6 +420,11 @@ where { let emacs_length = emacs.len(); let wasm_length = wasm.len(); + if emacs_length == 1 && wasm_length == 0 { + if emacs.all(|t| matches!(t.as_atom(), Ok(r#""""#))) { + return Ok(WasmDiffResult::default()); + } + } if emacs_length != wasm_length { return Ok(WasmDiffResult { status: vec![WasmDiffStatus::Bad(