mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Add Physical mode to realpath
This adds the 'Physical Mode' and 'Logical Mode' switches to realpath, which control when symlinks are resolved.
This commit is contained in:
parent
c98e7f5de9
commit
0e04f959c2
8 changed files with 153 additions and 45 deletions
|
@ -2,6 +2,17 @@ use crate::common::util::*;
|
|||
|
||||
static GIBBERISH: &str = "supercalifragilisticexpialidocious";
|
||||
|
||||
#[test]
|
||||
fn test_resolve() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
|
||||
at.touch("foo");
|
||||
at.symlink_file("foo", "bar");
|
||||
|
||||
scene.ucmd().arg("bar").succeeds().stdout_contains("foo\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_canonicalize() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue