| 1 | module main |
| 2 | |
| 3 | fn test_parse_vpm_command_skips_option_values() { |
| 4 | args := ['-m', 'https://mirror.example', 'install', '--once', 'nedpals.args'] |
| 5 | assert parse_vpm_command(args) == 'install' |
| 6 | } |
| 7 | |
| 8 | fn test_parse_query_args_skips_option_values() { |
| 9 | args := ['install', '-m', 'https://mirror.example', 'nedpals.args'] |
| 10 | assert parse_query_args(args, 'install') == ['nedpals.args'] |
| 11 | } |
| 12 | |
| 13 | fn test_parse_query_args_empty_with_only_mirror() { |
| 14 | args := ['install', '-m', 'https://mirror.example'] |
| 15 | assert parse_query_args(args, 'install') == []string{} |
| 16 | } |
| 17 | |
| 18 | fn test_merge_server_urls_appends_custom_urls_after_defaults() { |
| 19 | default_urls := ['https://official-a.example', 'https://official-b.example'] |
| 20 | custom_urls := ['https://official-b.example', 'https://mirror.example'] |
| 21 | assert merge_server_urls(default_urls, custom_urls) == [ |
| 22 | 'https://official-a.example', |
| 23 | 'https://official-b.example', |
| 24 | 'https://mirror.example', |
| 25 | ] |
| 26 | } |
| 27 | |