1
0

fix: fix refstr concept issue

This commit is contained in:
2026-05-18 21:14:26 +08:00
parent 3b0080849d
commit bc419f8d5e
3 changed files with 42 additions and 10 deletions

View File

@@ -134,6 +134,13 @@ fn test_icon_ref_str() {
r#"%SystemRoot%\System32\imageres.dll,-72"#,
(r#"%SystemRoot%\System32\imageres.dll"#, 72),
);
ok_tester(
r#""D:\Software\Krita\Krita (x64)\shellex\kritafile.ico",0"#,
(
r#""D:\Software\Krita\Krita (x64)\shellex\kritafile.ico""#,
0,
),
);
err_tester(r#"C:\Windows\Cursors\aero_arrow.cur"#);
err_tester(r#"This is my application, OK?"#);
err_tester(r#"@%SystemRoot%\System32\shell32.dll,-30596"#);
@@ -161,6 +168,10 @@ fn test_str_ref_str() {
r#"@%SystemRoot%\System32\shell32.dll,-30596"#,
(r#"%SystemRoot%\System32\shell32.dll"#, 30596),
);
ok_tester(
r#"@%SystemRoot%\System32\shell32.dll,30596"#,
(r#"%SystemRoot%\System32\shell32.dll"#, 30596),
);
err_tester(r#"This is my application, OK?"#);
err_tester(r#"%SystemRoot%\System32\imageres.dll,-72"#);
}
@@ -230,7 +241,7 @@ fn test_expand_string() {
let expand_final_string = expand_final_string.unwrap();
let expanded_final_string = expand_final_string.expand();
assert!(expanded_final_string.is_ok());
let expanded_final_string= expanded_final_string.unwrap();
let expanded_final_string = expanded_final_string.unwrap();
// Then we expand variable name individually
let expand_var_name = ExpandString::new(var_name);