summaryrefslogblamecommitdiffstats
path: root/test/trailing-ws.test
blob: ef7cc085aec612be826ee993b35a745904150549 (plain) (tree)
1
2
3
4
5
6
7
8
9
                       
 




                 
                             
                                           

                     
                                             
 




                 
                       
                                                        
                                       


                                         



                                                        
                                       

                                                   
                                                          
                                       


                                         
                      
                                      







                              
                                            

                     
                                              







                                                        
                                        






                                                        
                                        


                                                          
                                        



                                          
                                       
                            
	$ mkdir patches

	$ cat > a
	< a
	< b
	< c

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

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

	$ cat > a
	< a 
	< b
	< c 

	$ quilt refresh
	> Warning: trailing whitespace in lines 1,3 of a
	> Refreshed patch %{P}test.diff

	$ grep '[ \t]$' patches/test.diff
	> +a 
	> +c 

	$ quilt refresh -U0
	> Warning: trailing whitespace in lines 1,3 of a
	> Refreshed patch %{P}test.diff

	$ quilt refresh --strip-trailing-whitespace
	> Removing trailing whitespace from lines 1,3 of a
	> Refreshed patch %{P}test.diff

	$ grep '[ \t]$' patches/test.diff

	$ quilt pop -q
	> Removing patch %{P}test.diff
	> No patches applied

	$ cat > a
	< a
	< b
	< c

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

	$ quilt add a
	> File a added to patch %{P}test2.diff

	$ cat > a
	< a 
	< b
	< c 

	$ quilt refresh -c
	> Warning: trailing whitespace in lines 1,3 of a
	> Refreshed patch %{P}test2.diff

	$ grep '[ \t]$' patches/test2.diff
	> ! a 
	> ! c 

	$ quilt refresh -C0
	> Warning: trailing whitespace in lines 1,3 of a
	> Refreshed patch %{P}test2.diff

	$ quilt refresh -c --strip-trailing-whitespace
	> Removing trailing whitespace from lines 1,3 of a
	> Refreshed patch %{P}test2.diff

	$ grep '[ \t]$' patches/test2.diff

	$ quilt pop -q
	> Removing patch %{P}test2.diff
	> No patches applied