]> git.99rst.org Git - git.git/commit
tests: allow testing if a path is truly a file or a directory
authorCOGONI Guillaume <redacted>
Tue, 22 Feb 2022 21:54:29 +0000 (22:54 +0100)
committerJunio C Hamano <redacted>
Wed, 23 Feb 2022 23:08:44 +0000 (15:08 -0800)
commit456296b5d1f05ca16949e7d37ae87f5750118564
tree9a799a0c1724dee01338e8e44cab2c300a921432
parentf01f948282d00b0e22ff08a3acf859fd49bff07c
tests: allow testing if a path is truly a file or a directory

Add test_path_is_file_not_symlink(), test_path_is_dir_not_symlink()
and test_path_is_symlink(). Case of use for the first one
in test t/t3903-stash.sh to replace "test -f" because that function
explicitly want the file not to be a symlink.
Give more friendly error message.

Signed-off-by: COGONI Guillaume <redacted>
Co-authored-by: BRESSAT Jonathan <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t3903-stash.sh
t/test-lib-functions.sh
git clone https://git.99rst.org/PROJECT