quilt-dev
[Top][All Lists]
Advanced

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

[Quilt-dev] [PATCH 1/3] edit: Improve the test case


From: Jean Delvare
Subject: [Quilt-dev] [PATCH 1/3] edit: Improve the test case
Date: Wed, 11 Feb 2015 09:01:14 +0100

Cover one more use case of the "edit" command in the test case: file
creation.

Also reorder some of the commands to make the tests easier to follow.
The intent is easier to understand when the result is tested after
each command.
---
 test/edit.test |   27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

--- quilt.orig/test/edit.test   2015-02-10 15:09:55.032393671 +0100
+++ quilt/test/edit.test        2015-02-11 08:56:07.967192289 +0100
@@ -1,5 +1,6 @@
 $ mkdir patches subdir
 
+# Test the behavior if the editor modifies existing files
 $ cat > editor
 < #! /bin/sh
 < echo Editing $1
@@ -16,15 +17,15 @@ $ quilt edit foobar
 > File foobar added to patch patches/patch
 > Editing foobar
 
+$ cat foobar
+> barbar
+
 $ cd subdir
 $ echo foo > foo
 $ quilt edit foo
 > File subdir/foo added to patch ../patches/patch
 > Editing subdir/foo
-
 $ cd ..
-$ cat foobar
-> barbar
 
 $ cat subdir/foo
 > bar
@@ -32,3 +33,23 @@ $ cat subdir/foo
 $ quilt files
 > foobar
 > subdir/foo
+
+$ quilt refresh
+> Refreshed patch patches/patch
+
+# Test the behavior if the editor creates a brand new file
+$ cat > editor
+< #! /bin/sh
+< echo Creating $1
+< echo "new line" > $1
+
+$ quilt edit foo2
+> File foo2 added to patch patches/patch
+> Creating foo2
+$ cat foo2
+> new line
+
+$ quilt files -v
+> + foo2
+>   foobar
+>   subdir/foo

-- 
Jean Delvare
SUSE L3 Support



reply via email to

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