From ce88c56446fb5581f83135e55be9bfea46a850e1 Mon Sep 17 00:00:00 2001 From: larpon <768942+larpon@users.noreply.github.com> Date: Sat, 30 Aug 2025 01:18:58 +0200 Subject: [PATCH] flag: clean up `flag_to_tail_bool_test.v` (#25192) --- vlib/flag/flag_to_tail_bool_test.v | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/vlib/flag/flag_to_tail_bool_test.v b/vlib/flag/flag_to_tail_bool_test.v index 722708288..d28176c2e 100644 --- a/vlib/flag/flag_to_tail_bool_test.v +++ b/vlib/flag/flag_to_tail_bool_test.v @@ -1,11 +1,5 @@ import flag -const args_bool_short_tail = ['some.exe', '-h'] -const args_bool_long_tail = ['some.exe', '-help'] - -const args_bool_short_mixed = ['some.exe', '-h', '-long', 'val'] -const args_bool_long_mixed = ['some.exe', '-help', '-long', 'val'] - struct CliOptions { show_help bool @[long: 'help'; short: h] } @@ -16,7 +10,7 @@ struct CliOptions2 { } fn test_v_style_short_tail_bool() { - cli_options, unmatched := flag.to_struct[CliOptions](args_bool_short_tail, + cli_options, unmatched := flag.to_struct[CliOptions](['some.exe', '-h'], skip: 1 style: .v mode: .relaxed @@ -33,7 +27,7 @@ fn test_v_style_short_tail_bool() { } fn test_v_style_long_tail_bool() { - cli_options, unmatched := flag.to_struct[CliOptions](args_bool_long_tail, + cli_options, unmatched := flag.to_struct[CliOptions](['some.exe', '-help'], skip: 1 style: .v mode: .relaxed @@ -50,7 +44,7 @@ fn test_v_style_long_tail_bool() { } fn test_v_style_short_bool() { - cli_options, unmatched := flag.to_struct[CliOptions2](args_bool_short_mixed, + cli_options, unmatched := flag.to_struct[CliOptions2](['some.exe', '-h', '-long', 'val'], skip: 1 style: .v mode: .relaxed @@ -68,7 +62,7 @@ fn test_v_style_short_bool() { } fn test_v_style_long_bool() { - cli_options, unmatched := flag.to_struct[CliOptions2](args_bool_long_mixed, + cli_options, unmatched := flag.to_struct[CliOptions2](['some.exe', '-help', '-long', 'val'], skip: 1 style: .v mode: .relaxed -- 2.39.5