From d85db07c27b2418bad09a9ac2202184d743e4152 Mon Sep 17 00:00:00 2001 From: Bahex <17417311+Bahex@users.noreply.github.com> Date: Fri, 2 May 2025 08:19:23 +0300 Subject: [PATCH] update tests --- tests/repl/test_signatures.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/repl/test_signatures.rs b/tests/repl/test_signatures.rs index 8d9bd071bf..0fee593546 100644 --- a/tests/repl/test_signatures.rs +++ b/tests/repl/test_signatures.rs @@ -342,30 +342,30 @@ fn table_annotations_with_extra_characters() -> TestResult { #[rstest] fn one_of_annotations( #[values( - ("cell-path, list", "a.b.c", "cell-path"), - ("cell-path, list", "[a.b.c d.e.f]", "list"), - ("closure, any", "{}", "closure"), - ("closure, any", "{a: 1}", "record"), + ("(cell-path | list)", "a.b.c", "cell-path"), + ("(cell-path | list)", "[a.b.c d.e.f]", "list"), + ("(closure | any)", "{}", "closure"), + ("(closure | any)", "{a: 1}", "record"), )] annotation_data: (&str, &str, &str), ) -> TestResult { - let (types, argument, expected) = annotation_data; + let (one_of_type, argument, expected) = annotation_data; - let input = format!("def run [t: one_of({types})] {{ $t }}; run {argument} | describe"); + let input = format!("def run [t: {one_of_type}] {{ $t }}; run {argument} | describe"); run_test(&input, expected) } #[test] fn one_of_annotations_not_terminated() -> TestResult { - let input = "def run [t: one_of(binary, string] { $t }"; + let input = "def run [t: (binary | string] { $t }"; let expected = "expected closing )"; fail_test(input, expected) } #[test] fn one_of_annotations_with_extra_characters() -> TestResult { - let input = "def run [t: one_of(int, string)extra] {$t}"; - let expected = "Extra characters in the parameter name"; + let input = "def run [t: (int | string)extra] {$t}"; + let expected = "Unknown type."; fail_test(input, expected) }