Move relative date formatting to separate function
[tig.git] / test / stage / gh-410-test
blob82213fb91472bd0bf7d37099add709cd661f8e2f
1 #!/bin/sh
3 . libtest.sh
4 . libgit.sh
6 export LINES=12
8 steps '
9 :save-display status-before.screen
12 :enter
13 :maximize
14 :save-display unstaged-changes.screen
16 :10
17 :stage-update-line
18 :save-display status-after.screen
21 git_init
23 test_setup_work_dir()
25 echo "Hello" > hello.txt
26 git add .
27 git_commit -m "first commit"
28 echo "Hello2" >> hello.txt
31 test_tig status
33 assert_equals 'status-before.screen' <<EOF
34 On branch master
35 Changes to be committed:
36 (no files)
37 Changed but not updated:
38 M hello.txt
39 Untracked files:
40 (no files)
44 [status] Nothing to update 100%
45 EOF
47 assert_equals 'unstaged-changes.screen' <<EOF
48 hello.txt | 1 +
49 1 file changed, 1 insertion(+)
51 diff --git a/hello.txt b/hello.txt
52 index e965047..7197273 100644
53 --- a/hello.txt
54 +++ b/hello.txt
55 @@ -1 +1,2 @@
56 Hello
57 +Hello2
58 [stage] Press '<Enter>' to jump to file diff - line 1 of 10 100%
59 EOF
61 assert_equals 'status-after.screen' <<EOF
62 On branch master
63 Changes to be committed:
64 M hello.txt
65 Changed but not updated:
66 (no files)
67 Untracked files:
68 (no files)
72 [status] Press u to unstage 'hello.txt' for commit 100%
73 EOF