quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] [PATCH] Test backup failure


From: Jean Delvare
Subject: [Quilt-dev] [PATCH] Test backup failure
Date: Thu, 12 Mar 2015 11:07:52 +0100

Add a test case for backup failure to the test suite.
---
 test/failbackup.test |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

--- /dev/null
+++ b/test/failbackup.test
@@ -0,0 +1,23 @@
+       $ mkdir patches
+
+       $ quilt new test.diff
+       > Patch %{P}test.diff is now on top
+
+       $ quilt add test.txt
+       > File test.txt added to patch %{P}test.diff
+       $ cat > test.txt
+       < This is test.txt.
+       $ quilt refresh
+       > Refreshed patch patches/test.diff
+
+What happens when refresh fails because of a permission error?
+
+       $ chmod -w patches
+       $ cat > test.txt
+       < This is updated test.txt.
+       $ quilt refresh --backup
+       >~ mv: cannot move [`']?%{P}test.diff'? to [`']?%{P}test.diff~'?: 
Permission denied
+       $ echo %{?}
+       > 1
+
+       $ chmod +w patches

-- 
Jean Delvare
SUSE L3 Support




reply via email to

[Prev in Thread] Current Thread [Next in Thread]