diff --git a/crates/compiler/uitest/src/uitest.rs b/crates/compiler/uitest/src/uitest.rs index ccad5a1962..df16e5eeaf 100644 --- a/crates/compiler/uitest/src/uitest.rs +++ b/crates/compiler/uitest/src/uitest.rs @@ -136,7 +136,7 @@ impl TestCase { let found_infer_opts = RE_OPT_INFER.captures_iter(data); for infer_opt in found_infer_opts { let opt = infer_opt.name("opt").unwrap().as_str(); - match opt { + match opt.trim() { "allow_errors" => infer_opts.allow_errors = true, "print_only_under_alias" => infer_opts.print_only_under_alias = true, other => return Err(format!("unknown infer option: {other}").into()), @@ -152,7 +152,7 @@ impl TestCase { let found_infer_opts = RE_OPT_PRINT.captures_iter(data); for infer_opt in found_infer_opts { let opt = infer_opt.name("opt").unwrap().as_str(); - match opt { + match opt.trim() { "can_decls" => print_opts.can_decls = true, other => return Err(format!("unknown print option: {other}").into()), }