chore(stat): Add test case for percent escaping

This commit is contained in:
Guillem L. Jara
2026-01-01 19:49:10 +01:00
parent fa9dcd5d32
commit 7c489120dc
+11
View File
@@ -567,3 +567,14 @@ fn test_mount_point_combined_with_other_specifiers() {
"Should print mount point, file name, and size"
);
}
#[cfg(unix)]
#[test]
fn test_percent_escaping() {
let ts = TestScenario::new(util_name!());
let result = ts
.ucmd()
.args(&["--printf", "%%%m%%m%m%%%", "/bin/sh"])
.succeeds();
assert_eq!(result.stdout_str(), "%/%m/%%");
}