Move relative date formatting to separate function
[tig.git] / test / main / date-test
blob0c1a994493d0ff342a83978f595a3acd795f6089
1 #!/bin/sh
3 . libtest.sh
4 . libgit.sh
6 export TEST_TIME_NOW=1441051553
7 export LINES=27
9 tigrc <<EOF
10 set vertical-split = no
11 EOF
13 steps '
14 :save-display default-date.screen
16 :toggle date
17 :save-display local-date.screen
19 :toggle date
20 :save-display relative-date.screen
22 :toggle date
23 :save-display short-date.screen
25 :toggle date
26 :save-display no-date.screen
29 test_tig --pretty=raw < "$source_dir/$test.in"
31 assert_equals 'default-date.screen' <<EOF
32 2015-08-31 04:01 Kentaro Wada Add zsh completion file for autoload
33 2015-08-23 18:32 Jonas Fonseca Refactor DEFINE_ALLOCATOR to use helper met
34 2015-07-16 11:46 Sven Wegener display: factor out separator functions
35 2015-08-22 16:20 Jonas Fonseca Merge pull request #429 from ideal/master
36 2015-08-18 15:24 ideal check if mem is NULL in DEFINE_ALLOCATOR
37 2015-06-07 23:44 Jonas Fonseca Use git_init to initialize the test/stage/g
38 2015-04-06 20:34 Jonas Fonseca Keep unstaged changes view open after an st
39 2015-03-30 07:43 Jonas Fonseca When redrawing the readline prompt also upd
40 2015-02-02 21:53 Jonas Fonseca Move script helper before usages in the dis
41 2015-01-29 10:44 Jonas Fonseca Merge branch 'hashed-refs'
42 2014-12-04 11:22 Jonas Fonseca hashed-refs: Use a hash table as the main d
43 2014-11-08 09:55 Jonas Fonseca Unify option_info lookup for normal options
44 2014-10-06 21:22 Jonas Fonseca Add option to turn off automatic enabling o
45 2014-09-23 12:54 Tom Greuter Add option to install Tig with Homebrew
46 2014-09-04 07:19 Jonas Fonseca Fix diff context restoring for diff opened
47 2013-12-15 09:55 Michael Barlow Add mouse support
48 2012-09-30 22:43 Jonas Fonseca Refactor stage view title formatting
49 2012-08-30 10:47 Jonas Fonseca [GH #83] WIP: main view lazy navigation mod
50 2011-10-13 11:46 P. Sadik Create and use dup() of STDIN_FILENO instea
51 2010-09-15 21:01 Jonathan Neuschäfer Don't show out-of-sight tildes
52 2010-06-28 10:26 Pierre Habouzit Add an option to ignore unknown directories
53 2009-01-17 23:10 Jonas Fonseca Fix another regression from the dirty flag
54 2007-09-29 23:23 Jonas Fonseca tig-0.10.git
55 2006-09-12 00:22 Jonas Fonseca Only split the tree view when the tree view
56 2006-04-10 18:39 Jonas Fonseca Initial commit
57 [main] 91912eb97da4f6907015dab41ef9bba315730854 - commit 1 of 25 100%
58 EOF
60 assert_equals 'local-date.screen' <<EOF
61 2015-08-30 19:01 Kentaro Wada Add zsh completion file for autoload
62 2015-08-23 22:32 Jonas Fonseca Refactor DEFINE_ALLOCATOR to use helper met
63 2015-07-16 09:46 Sven Wegener display: factor out separator functions
64 2015-08-22 20:20 Jonas Fonseca Merge pull request #429 from ideal/master
65 2015-08-18 07:24 ideal check if mem is NULL in DEFINE_ALLOCATOR
66 2015-06-08 03:44 Jonas Fonseca Use git_init to initialize the test/stage/g
67 2015-04-07 00:34 Jonas Fonseca Keep unstaged changes view open after an st
68 2015-03-30 11:43 Jonas Fonseca When redrawing the readline prompt also upd
69 2015-02-03 02:53 Jonas Fonseca Move script helper before usages in the dis
70 2015-01-29 15:44 Jonas Fonseca Merge branch 'hashed-refs'
71 2014-12-04 16:22 Jonas Fonseca hashed-refs: Use a hash table as the main d
72 2014-11-08 14:55 Jonas Fonseca Unify option_info lookup for normal options
73 2014-10-07 01:22 Jonas Fonseca Add option to turn off automatic enabling o
74 2014-09-23 10:54 Tom Greuter Add option to install Tig with Homebrew
75 2014-09-04 11:19 Jonas Fonseca Fix diff context restoring for diff opened
76 2013-12-14 22:55 Michael Barlow Add mouse support
77 2012-10-01 02:43 Jonas Fonseca Refactor stage view title formatting
78 2012-08-30 14:47 Jonas Fonseca [GH #83] WIP: main view lazy navigation mod
79 2011-10-13 06:16 P. Sadik Create and use dup() of STDIN_FILENO instea
80 2010-09-16 01:01 Jonathan Neuschäfer Don't show out-of-sight tildes
81 2010-06-28 08:26 Pierre Habouzit Add an option to ignore unknown directories
82 2009-01-17 22:10 Jonas Fonseca Fix another regression from the dirty flag
83 2007-09-29 21:23 Jonas Fonseca tig-0.10.git
84 2006-09-11 22:22 Jonas Fonseca Only split the tree view when the tree view
85 2006-04-10 16:39 Jonas Fonseca Initial commit
86 [main] 91912eb97da4f6907015dab41ef9bba315730854 - commit 1 of 25 100%
87 EOF
89 assert_equals 'relative-date.screen' <<EOF
90 25 hours ago Kentaro Wada Add zsh completion file for autoload
91 7 days ago Jonas Fonseca Refactor DEFINE_ALLOCATOR to use helper method
92 1 month ago Sven Wegener display: factor out separator functions
93 8 days ago Jonas Fonseca Merge pull request #429 from ideal/master
94 13 days ago ideal check if mem is NULL in DEFINE_ALLOCATOR
95 2 months ago Jonas Fonseca Use git_init to initialize the test/stage/gh-4
96 4 months ago Jonas Fonseca Keep unstaged changes view open after an stagi
97 5 months ago Jonas Fonseca When redrawing the readline prompt also update
98 6 months ago Jonas Fonseca Move script helper before usages in the displa
99 7 months ago Jonas Fonseca Merge branch 'hashed-refs'
100 9 months ago Jonas Fonseca hashed-refs: Use a hash table as the main data
101 9 months ago Jonas Fonseca Unify option_info lookup for normal options an
102 10 months ago Jonas Fonseca Add option to turn off automatic enabling of t
103 11 months ago Tom Greuter Add option to install Tig with Homebrew
104 12 months ago Jonas Fonseca Fix diff context restoring for diff opened dir
105 1 year ago Michael Barlow Add mouse support
106 2 years ago Jonas Fonseca Refactor stage view title formatting
107 3 years ago Jonas Fonseca [GH #83] WIP: main view lazy navigation mode p
108 3 years ago P. Sadik Create and use dup() of STDIN_FILENO instead o
109 4 years ago Jonathan Neuschäfer Don't show out-of-sight tildes
110 5 years ago Pierre Habouzit Add an option to ignore unknown directories co
111 6 years ago Jonas Fonseca Fix another regression from the dirty flag cha
112 7 years ago Jonas Fonseca tig-0.10.git
113 8 years ago Jonas Fonseca Only split the tree view when the tree view is
114 9 years ago Jonas Fonseca Initial commit
115 [main] 91912eb97da4f6907015dab41ef9bba315730854 - commit 1 of 25 100%
118 assert_equals 'short-date.screen' <<EOF
119 2015-08-31 Kentaro Wada Add zsh completion file for autoload
120 2015-08-23 Jonas Fonseca Refactor DEFINE_ALLOCATOR to use helper method an
121 2015-07-16 Sven Wegener display: factor out separator functions
122 2015-08-22 Jonas Fonseca Merge pull request #429 from ideal/master
123 2015-08-18 ideal check if mem is NULL in DEFINE_ALLOCATOR
124 2015-06-07 Jonas Fonseca Use git_init to initialize the test/stage/gh-410-
125 2015-04-06 Jonas Fonseca Keep unstaged changes view open after an staging
126 2015-03-30 Jonas Fonseca When redrawing the readline prompt also update th
127 2015-02-02 Jonas Fonseca Move script helper before usages in the display m
128 2015-01-29 Jonas Fonseca Merge branch 'hashed-refs'
129 2014-12-04 Jonas Fonseca hashed-refs: Use a hash table as the main data st
130 2014-11-08 Jonas Fonseca Unify option_info lookup for normal options and v
131 2014-10-06 Jonas Fonseca Add option to turn off automatic enabling of topo
132 2014-09-23 Tom Greuter Add option to install Tig with Homebrew
133 2014-09-04 Jonas Fonseca Fix diff context restoring for diff opened direct
134 2013-12-15 Michael Barlow Add mouse support
135 2012-09-30 Jonas Fonseca Refactor stage view title formatting
136 2012-08-30 Jonas Fonseca [GH #83] WIP: main view lazy navigation mode prot
137 2011-10-13 P. Sadik Create and use dup() of STDIN_FILENO instead of S
138 2010-09-15 Jonathan Neuschäfer Don't show out-of-sight tildes
139 2010-06-28 Pierre Habouzit Add an option to ignore unknown directories conte
140 2009-01-17 Jonas Fonseca Fix another regression from the dirty flag change
141 2007-09-29 Jonas Fonseca tig-0.10.git
142 2006-09-12 Jonas Fonseca Only split the tree view when the tree view is vi
143 2006-04-10 Jonas Fonseca Initial commit
144 [main] 91912eb97da4f6907015dab41ef9bba315730854 - commit 1 of 25 100%
147 assert_equals 'no-date.screen' <<EOF
148 Kentaro Wada Add zsh completion file for autoload
149 Jonas Fonseca Refactor DEFINE_ALLOCATOR to use helper method and asserts
150 Sven Wegener display: factor out separator functions
151 Jonas Fonseca Merge pull request #429 from ideal/master
152 ideal check if mem is NULL in DEFINE_ALLOCATOR
153 Jonas Fonseca Use git_init to initialize the test/stage/gh-410-test repo
154 Jonas Fonseca Keep unstaged changes view open after an staging command
155 Jonas Fonseca When redrawing the readline prompt also update the cursor po
156 Jonas Fonseca Move script helper before usages in the display module
157 Jonas Fonseca Merge branch 'hashed-refs'
158 Jonas Fonseca hashed-refs: Use a hash table as the main data structure for
159 Jonas Fonseca Unify option_info lookup for normal options and view column
160 Jonas Fonseca Add option to turn off automatic enabling of topo-order
161 Tom Greuter Add option to install Tig with Homebrew
162 Jonas Fonseca Fix diff context restoring for diff opened directly via 'tig
163 Michael Barlow Add mouse support
164 Jonas Fonseca Refactor stage view title formatting
165 Jonas Fonseca [GH #83] WIP: main view lazy navigation mode prototype
166 P. Sadik Create and use dup() of STDIN_FILENO instead of STDIN_FILENO
167 Jonathan Neuschäfer Don't show out-of-sight tildes
168 Pierre Habouzit Add an option to ignore unknown directories contents in the
169 Jonas Fonseca Fix another regression from the dirty flag changes causing f
170 Jonas Fonseca tig-0.10.git
171 Jonas Fonseca Only split the tree view when the tree view is visible
172 Jonas Fonseca Initial commit
173 [main] 91912eb97da4f6907015dab41ef9bba315730854 - commit 1 of 25 100%