From d90d4f849ce7dbf80755fc04ab791e03d6179dc3 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Wed, 18 Dec 2019 12:31:24 -0600 Subject: [PATCH] Force symlink creation in realpath tests If an earlier test was aborted, the symlink would still be present and the subsequent run will fail to create the symlink as it wasn't forced. --- tests/checks/realpath.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/checks/realpath.fish b/tests/checks/realpath.fish index 6add05cf2..8a6d6646a 100644 --- a/tests/checks/realpath.fish +++ b/tests/checks/realpath.fish @@ -52,7 +52,7 @@ builtin realpath . popd # A single symlink to a directory is correctly resolved. -ln -s fish $XDG_DATA_HOME/fish-symlink +ln -fs fish $XDG_DATA_HOME/fish-symlink set -l real_path (builtin realpath $XDG_DATA_HOME/fish-symlink) set -l expected_real_path "$data_home_realpath/fish" if test "$real_path" = "$expected_real_path" @@ -74,9 +74,9 @@ else end # A path with two symlinks, first to a directory, second to a file, is correctly resolved. -ln -s fish $XDG_DATA_HOME/fish-symlink2 +ln -fs fish $XDG_DATA_HOME/fish-symlink2 touch $XDG_DATA_HOME/fish/real_file -ln -s real_file $XDG_DATA_HOME/fish/symlink_file +ln -fs real_file $XDG_DATA_HOME/fish/symlink_file set -l real_path (builtin realpath $XDG_DATA_HOME/fish-symlink/symlink_file) set -l expected_real_path "$data_home_realpath/fish/real_file" if test "$real_path" = "$expected_real_path"