summaryrefslogblamecommitdiffstats
path: root/test/timestamps.test
blob: f6772b33b14825910638fe63724ac6121a63fd62 (plain) (tree)
1
2
3
4
5
6
7
8







                                                        


                      






















                                                   

























                                                   



                              





                                                   




                                             



                                             
 
                      



                              


                              
# Test how quilt behaves when patches include timestamps

$ mkdir patches

$ cat > patches/series
< unified-create.patch
< unified-update.patch
< unified-delete.patch
< context-create.patch
< context-update.patch
< context-delete.patch

$ cat > patches/unified-create.patch
< diff -ruN a/file b/file
< --- a/file	1970-01-01 01:00:00.000000000 +0100
< +++ b/file	2014-01-15 11:19:43.000000000 +0100
< @@ -0,0 +1 @@
< +new line

$ cat > patches/unified-update.patch
< diff -ruN a/file b/file
< --- a/file	2014-01-15 11:19:43.000000000 +0100
< +++ b/file	2014-01-15 11:20:17.000000000 +0100
< @@ -1 +1 @@
< -new line
< +updated line

$ cat > patches/unified-delete.patch
< diff -ruN a/file b/file
< --- a/file	2014-01-15 11:20:17.000000000 +0100
< +++ b/file	1970-01-01 01:00:00.000000000 +0100
< @@ -1 +0,0 @@
< -updated line

$ cat > patches/context-create.patch
< *** /dev/null	2014-06-24 08:55:39.152180961 +0200
< --- b/file	2014-06-26 13:08:29.608831581 +0200
< ***************
< *** 0 ****
< --- 1 ----
< + new line

$ cat > patches/context-update.patch
< *** a/file	2014-06-26 13:08:29.608831581 +0200
< --- b/file	2014-06-26 13:08:33.872849083 +0200
< ***************
< *** 1 ****
< ! new line
< --- 1 ----
< ! updated line

$ cat > patches/context-delete.patch
< *** a/file	2014-06-26 13:08:33.872849083 +0200
< --- /dev/null	2014-06-24 08:55:39.152180961 +0200
< ***************
< *** 1 ****
< - updated line
< --- 0 ----

# Test unapplied patches
$ quilt patches file
> patches/unified-create.patch
> patches/unified-update.patch
> patches/unified-delete.patch
> patches/context-create.patch
> patches/context-update.patch
> patches/context-delete.patch

# Make sure we don't take line counts as file names
$ quilt patches 1

$ quilt push -qa
> Applying patch patches/unified-create.patch
> Applying patch patches/unified-update.patch
> Applying patch patches/unified-delete.patch
> Applying patch patches/context-create.patch
> Applying patch patches/context-update.patch
> Applying patch patches/context-delete.patch
> Now at patch patches/context-delete.patch

# Test applied patches
$ quilt patches file
> patches/unified-create.patch
> patches/unified-update.patch
> patches/unified-delete.patch
> patches/context-create.patch
> patches/context-update.patch
> patches/context-delete.patch