summaryrefslogblamecommitdiffstats
path: root/test/space-in-filenames.test
blob: e7cc1df33d1d14315ad9bae57951209b4aa25f91 (plain) (tree)
1
2
3
4
5
6
7
8

               
                     
                                   
 
               
                                       
                


             
                   
               
                         
 
                      
                     
                                           



             
                         
               

                             

                      
                                            




             
                          
               


                        
 





                                                                     
                  

               





                                                                     

                                                                     

                 




                     
                               



                                                                     
                  

               





                                                                     

                                                                     

                 




                            
                                  



                                                                     
                  

               





                                                                     

                                                                     

                 



             






                   

                     
                                   

                                  

                            

















                                  
                         
                                                




             
                        
                                               


             
$ mkdir patches

$ quilt new test.diff
> Patch %{P}test.diff is now on top

$ quilt add foo
> File foo added to patch %{P}test.diff
$ echo foo > foo

$ quilt files
> foo
$ quilt patches foo
> %{P}test.diff
$ quilt patches "foo bar"

$ echo foo > "foo bar"
$ quilt add "foo bar"
> File foo bar added to patch %{P}test.diff

$ quilt files
> foo
> foo bar
$ quilt patches "foo bar"
> %{P}test.diff
$ quilt patches bar
$ quilt patches "foo bar baz"

$ quilt add "a: b [c]"
> File a: b [c] added to patch %{P}test.diff

$ quilt files
> a: b [c]
> foo
> foo bar
$ quilt patches 'a: b [c]'
> %{P}test.diff
$ quilt patches a
$ quilt patches b
$ quilt patches 'a: b c'

$ echo bar > "foo bar"
$ echo "new line" > "a: b [c]"
$ quilt diff -p ab
> Index: b/a: b [c]
> ===================================================================
> --- /dev/null
> +++ "b/a: b [c]"
> @@ -0,0 +1 @@
> +new line
> Index: b/foo
> ===================================================================
> --- /dev/null
> +++ b/foo
> @@ -0,0 +1 @@
> +foo
> Index: b/foo bar
> ===================================================================
> --- "a/foo bar"
> +++ "b/foo bar"
> @@ -1 +1 @@
> -foo
> +bar

$ quilt refresh -p ab
> Refreshed patch %{P}test.diff
$ cat patches/test.diff
> Index: b/a: b [c]
> ===================================================================
> --- /dev/null
> +++ "b/a: b [c]"
> @@ -0,0 +1 @@
> +new line
> Index: b/foo
> ===================================================================
> --- /dev/null
> +++ b/foo
> @@ -0,0 +1 @@
> +foo
> Index: b/foo bar
> ===================================================================
> --- "a/foo bar"
> +++ "b/foo bar"
> @@ -1 +1 @@
> -foo
> +bar

$ quilt refresh -p ab --sort
> Patch %{P}test.diff is unchanged
$ cat patches/test.diff
> Index: b/a: b [c]
> ===================================================================
> --- /dev/null
> +++ "b/a: b [c]"
> @@ -0,0 +1 @@
> +new line
> Index: b/foo
> ===================================================================
> --- /dev/null
> +++ b/foo
> @@ -0,0 +1 @@
> +foo
> Index: b/foo bar
> ===================================================================
> --- "a/foo bar"
> +++ "b/foo bar"
> @@ -1 +1 @@
> -foo
> +bar

$ quilt grep bar
> foo bar:bar
$ quilt grep new
> a: b [c]:new line
$ quilt grep " "
> a: b [c]:new line

$ quilt diff -p ab -z

# Removal order is nondeterministic
$ quilt pop
> Removing patch patches/test.diff
>~ Removing (a: b \[c\]|foo)
>~ Removing (a: b \[c\]|foo)
> Restoring foo bar
>
> No patches applied

$ quilt patches "foo bar"
> %{P}test.diff

$ quilt patches "a: b [c]"
> %{P}test.diff

$ quilt push
> Applying patch patches/test.diff
> patching file a: b [c]
> patching file foo
> patching file foo bar
>
> Now at patch patches/test.diff

$ quilt remove "a: b [c]"
> File a: b [c] removed from patch %{P}test.diff

$ quilt files
> foo
> foo bar

$ quilt remove "foo bar"
> File foo bar removed from patch %{P}test.diff

$ quilt files
> foo