Skip to content

Commit 604d02c

Browse files
committed
Fix cross-platform tests
1 parent 48368a6 commit 604d02c

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

cli/src/command/register.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,10 @@ mod tests {
293293
let path = expand_path("/absolute/path");
294294
assert_eq!(path, "/absolute/path");
295295

296-
// Tilde expansion should work
296+
// Tilde expansion should work (cross-platform)
297297
let home_path = expand_path("~/test");
298-
assert!(home_path.starts_with('/'));
299-
assert!(home_path.ends_with("/test"));
298+
assert!(!home_path.starts_with('~'), "Tilde should be expanded");
299+
assert!(home_path.contains("test"));
300300
}
301301

302302
#[test]

cli/src/command/unregister.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,10 @@ mod tests {
197197
let path = expand_path("/absolute/path");
198198
assert_eq!(path, "/absolute/path");
199199

200-
// Tilde expansion should work
200+
// Tilde expansion should work (cross-platform)
201201
let home_path = expand_path("~/test");
202-
assert!(home_path.starts_with('/'));
203-
assert!(home_path.ends_with("/test"));
202+
assert!(!home_path.starts_with('~'), "Tilde should be expanded");
203+
assert!(home_path.contains("test"));
204204
}
205205

206206
#[test]

0 commit comments

Comments
 (0)