~sircmpwn/ctools

757f8ea4ad84097e7a2418b1eed35366f78d8a46 — Drew DeVault 1 year, 2 months ago 6a0bbe3
test/unlink: use hardlink instead of symlink
1 files changed, 3 insertions(+), 3 deletions(-)

M test/unlink
M test/unlink => test/unlink +3 -3
@@ 3,9 3,9 @@

should_remove_link() {
	touch "$TMPDIR"/file
	ln -s "$TMPDIR"/file "$TMPDIR"/symlink
	unlink "$TMPDIR"/symlink
	[ -e "$TMPDIR"/file ] && ! [ -e "$TMPDIR"/symlink ] || return 1
	link "$TMPDIR"/file "$TMPDIR"/hardlink
	unlink "$TMPDIR"/hardlink
	[ -e "$TMPDIR"/file ] && ! [ -e "$TMPDIR"/hardlink ] || return 1
	unlink -- "$TMPDIR"/file
	! [ -e "$TMPDIR"/file ]
}