1
Fork 0
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:
James Robson 2021-06-27 11:47:23 +01:00
parent c98e7f5de9
commit 0e04f959c2
8 changed files with 153 additions and 45 deletions

View file

@ -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!();