Change str replace to match substring by default (#10038)

This commit is contained in:
Jakub Žádník
2023-08-18 00:18:16 +03:00
committed by GitHub
parent f33b60c001
commit 2e0fb7c1a6
3 changed files with 51 additions and 34 deletions

View File

@@ -20,7 +20,7 @@ fn can_get_help(#[case] exp_result: &str) -> TestResult {
--f2:string, # f2 named no default
--f3:int=33 # f3 named default 3
] {{ true }};
help t | ansi strip | find `{exp_result}` | get 0 | str replace -a '^(.*({exp_result}).*)$' '$2'"#,
help t | ansi strip | find `{exp_result}` | get 0 | str replace -ar '^(.*({exp_result}).*)$' '$2'"#,
),
exp_result,
)