summaryrefslogblamecommitdiffstats
path: root/test/dir-a-b.test
blob: 41045100c06f4d19356aaf0e547cdd5b95cc1f2f (plain) (tree)
1
2
3
4
5
6




                            
                            






                               







                         

                                              

                         










                                        







                         
 
                               








                                         

































                                         
                               

















                                         





                                        
	$ rm -rf d
	$ mkdir -p d/patches
	$ cd d

	$ echo a > test.txt
	$ echo d > test3.txt

	$ cat > patches/ab.diff
	< --- a/test.txt
	< +++ b/test.txt
	< @@ -1 +1 @@
	< -a
	< +b
	< --- /dev/null
	< +++ b/test2.txt
	< @@ -0,0 +1 @@
	< +c
	< --- a/test3.txt
	< +++ /dev/null
	< @@ -1 +0,0 @@
	< -d

	$ echo "ab.diff -pab" > patches/series
	$ quilt series
	> patches/ab.diff

	$ quilt push -q
	> Applying patch patches/ab.diff
	> Now at patch patches/ab.diff

	$ quilt diff --no-index
	> --- a/test.txt
	> +++ b/test.txt
	> @@ -1 +1 @@
	> -a
	> +b
	> --- /dev/null
	> +++ b/test2.txt
	> @@ -0,0 +1 @@
	> +c
	> --- a/test3.txt
	> +++ /dev/null
	> @@ -1 +0,0 @@
	> -d

	$ rm -f patches/ab.diff
	$ quilt refresh --no-index
	> Refreshed patch patches/ab.diff

	$ cat patches/ab.diff
	> --- a/test.txt
	> +++ b/test.txt
	> @@ -1 +1 @@
	> -a
	> +b
	> --- /dev/null
	> +++ b/test2.txt
	> @@ -0,0 +1 @@
	> +c
	> --- a/test3.txt
	> +++ /dev/null
	> @@ -1 +0,0 @@
	> -d

	$ quilt pop -qR
	> Removing patch patches/ab.diff
	> No patches applied

	$ echo "ab.diff" > patches/series

	$ quilt push -q
	> Applying patch patches/ab.diff
	> Now at patch patches/ab.diff

	$ quilt diff -p ab --no-index
	> --- a/test.txt
	> +++ b/test.txt
	> @@ -1 +1 @@
	> -a
	> +b
	> --- /dev/null
	> +++ b/test2.txt
	> @@ -0,0 +1 @@
	> +c
	> --- a/test3.txt
	> +++ /dev/null
	> @@ -1 +0,0 @@
	> -d

	$ rm -f patches/ab.diff
	$ quilt refresh -p ab --no-index
	> Refreshed patch patches/ab.diff

	$ cat patches/ab.diff
	> --- a/test.txt
	> +++ b/test.txt
	> @@ -1 +1 @@
	> -a
	> +b
	> --- /dev/null
	> +++ b/test2.txt
	> @@ -0,0 +1 @@
	> +c
	> --- a/test3.txt
	> +++ /dev/null
	> @@ -1 +0,0 @@
	> -d

	$ quilt pop -qR
	> Removing patch patches/ab.diff
	> No patches applied

	$ cd ..
	$ rm -rf d