Fix test to work on Travis
[tig.git] / test / stage / split-chunk-test
blobf4991b4a4f933623a477514661ef3b72933b3661
1 #!/bin/sh
3 . libtest.sh
4 . libgit.sh
6 export LINES=35
8 steps '
9 :6
10 :enter
11 :maximize
12 :save-display default-diff.screen
14 :12
15 :stage-split-chunk
16 :save-display split-diff.screen
19 in_work_dir create_dirty_workdir
20 in_work_dir sed -i -e 's/[36]/edited-too/' a
22 test_tig status
24 assert_equals 'default-diff.screen' <<EOF
25 a | 10 ++++------
26 1 file changed, 4 insertions(+), 6 deletions(-)
28 diff --git a/a b/a
29 index 12d1d9e..931fee6 100644
30 --- a/a
31 +++ b/a
32 @@ -1,11 +1,9 @@
33 -a
34 +a CHANGED
37 -3
38 +edited-too
41 -6
42 +edited-too
44 -8
45 -9
46 -10
47 \ No newline at end of file
48 +8
49 \ No newline at end of file
58 [stage] Press '<Enter>' to jump to file diff - line 1 of 25 100%
59 EOF
61 assert_equals 'split-diff.screen' <<EOF
62 a | 10 ++++------
63 1 file changed, 4 insertions(+), 6 deletions(-)
65 diff --git a/a b/a
66 index 12d1d9e..931fee6 100644
67 --- a/a
68 +++ b/a
69 @@ -1,3 +1,3 @@
70 -a
71 +a CHANGED
74 @@ -2,5 +2,5 @@
77 -3
78 +edited-too
81 @@ -5,4 +5,4 @@
84 -6
85 +edited-too
87 @@ -8,4 +8,1 @@
89 -8
90 -9
91 -10
92 \ No newline at end of file
93 +8
94 \ No newline at end of file
95 [stage] Unstaged changes to 'a' - line 12 of 33 100%
96 EOF