diff options
author | Jean Delvare <jdelvare@suse.de> | 2020-10-05 14:14:33 +0200 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2020-10-05 14:14:33 +0200 |
commit | 877075d3f525e0beed4c8416c6aa40d61b685c50 (patch) | |
tree | 5945bac7d78bc14842a49d8f065eebdfc5a632f3 /test | |
parent | 2a3ff09d9d61cbd9f83cc49b61f952acad1c38e9 (diff) | |
download | quilt-877075d3f525e0beed4c8416c6aa40d61b685c50.tar.gz |
Quote parameter to gen_tempfile as needed
When the parameter passed to gen_tempfile is based on the working
directory, we need to quote it because it could contain spaces or
other special characters. Also quote the string returned by this
function for the same reason.
Affected commands:
* quilt diff -z
* quilt fold
* quilt refresh -z
* quilt revert
Also test these code paths in the test suite to avoid regressions.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Diffstat (limited to 'test')
-rw-r--r-- | test/space-in-work-dir.test | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/test/space-in-work-dir.test b/test/space-in-work-dir.test index 7dcd468..2082845 100644 --- a/test/space-in-work-dir.test +++ b/test/space-in-work-dir.test @@ -27,9 +27,49 @@ $ cat patches/1.patch > -old > +new +$ echo newer > a +$ quilt diff -z +> Index: project/a +> =================================================================== +> --- project.orig/a +> +++ project/a +> @@ -1 +1 @@ +> -new +> +newer + +$ quilt revert a +> Changes to a in patch patches/1.patch reverted +$ quilt diff -z +$ echo newer > a + +$ quilt refresh -z +> Fork of patch patches/1.patch created as patches/1-2.patch +$ quilt series +> patches/1.patch +> patches/1-2.patch +$ cat patches/1.patch +> Index: project/a +> =================================================================== +> --- project.orig/a +> +++ project/a +> @@ -1 +1 @@ +> -old +> +new +$ cat patches/1-2.patch +> Index: project/a +> =================================================================== +> --- project.orig/a +> +++ project/a +> @@ -1 +1 @@ +> -new +> +newer + # Running a command when not at the root of the project tests additional # code paths $ cd subdir +$ quilt pop -q +> Removing patch ../patches/1-2.patch +> Now at patch ../patches/1.patch $ quilt diff --no-index > --- project.orig/a > +++ project/a @@ -55,6 +95,25 @@ $ quilt top $ quilt series -v > = patches/1.patch +> patches/1-2.patch + +$ quilt fold < patches/1-2.patch +> patching file a + +$ quilt diff -z +> Index: project/a +> =================================================================== +> --- project.orig/a +> +++ project/a +> @@ -1 +1 @@ +> -new +> +newer + +$ quilt refresh +> Refreshed patch patches/1.patch + +$ quilt delete -rn +> Removed patch patches/1-2.patch $ quilt remove a > File a removed from patch patches/1.patch |