Commit Diff


commit - d4ae64fa3ef3d9a996705303b38cf75eda7a996d
commit + 64773fdebbd1384548293154978d3e6e3f2e66ba
blob - 6a7dff907ff3ed86eb1cd3bffb039353bcb2d29b
blob + 2ecf3848716083ed82686978dfb7da32ea4ea299
--- regress/cmdline/rm.sh
+++ regress/cmdline/rm.sh
@@ -410,8 +410,10 @@ function test_rm_symlink {
 	(cd $testroot/repo && ln -s alpha alpha.link)
 	(cd $testroot/repo && ln -s epsilon epsilon.link)
 	(cd $testroot/repo && ln -s /etc/passwd passwd.link)
+	(cd $testroot/repo && ln -s ../beta epsilon/beta.link)
+	(cd $testroot/repo && ln -s nonexistent nonexistent.link)
 	(cd $testroot/repo && git add .)
-	git_commit $testroot/repo -m "add a symlink"
+	git_commit $testroot/repo -m "add symlinks"
 
 	got checkout $testroot/repo $testroot/wt > /dev/null
 	ret="$?"
@@ -423,18 +425,17 @@ function test_rm_symlink {
 	echo 'D  alpha.link' > $testroot/stdout.expected
 	echo 'D  epsilon.link' >> $testroot/stdout.expected
 	echo 'D  passwd.link' >> $testroot/stdout.expected
-	(cd $testroot/wt && got rm alpha.link epsilon.link passwd.link > \
-	    $testroot/stdout)
+	echo 'D  epsilon/beta.link' >> $testroot/stdout.expected
+	echo 'D  nonexistent.link' >> $testroot/stdout.expected
+	(cd $testroot/wt && got rm alpha.link epsilon.link passwd.link \
+		epsilon/beta.link nonexistent.link > $testroot/stdout)
 
 	cmp -s $testroot/stdout.expected $testroot/stdout
 	ret="$?"
 	if [ "$ret" != "0" ]; then
 		diff -u $testroot/stdout.expected $testroot/stdout
-		test_done "$testroot" "$ret"
-		return 1
 	fi
 	test_done "$testroot" "$ret"
-
 }
 
 run_test test_rm_basic