1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
#!/bin/sh
. libtest.sh
. libgit.sh
export LINES=35
steps '
:6
:enter
:maximize
:save-display default-diff.screen
:12
:stage-split-chunk
:save-display split-diff.screen
'
in_work_dir create_dirty_workdir
in_work_dir sh -c 'printf "a CHANGED\n1\n2\nedited-too\n4\n5\nedited-too\n7\n8" > a'
test_tig status
assert_equals 'default-diff.screen' <<EOF
a | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/a b/a
index 12d1d9e..931fee6 100644
--- a/a
+++ b/a
@@ -1,11 +1,9 @@
-a
+a CHANGED
1
2
-3
+edited-too
4
5
-6
+edited-too
7
-8
-9
-10
\ No newline at end of file
+8
\ No newline at end of file
[stage] Press '<Enter>' to jump to file diff - line 1 of 25 100%
EOF
assert_equals 'split-diff.screen' <<EOF
a | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/a b/a
index 12d1d9e..931fee6 100644
--- a/a
+++ b/a
@@ -1,3 +1,3 @@
-a
+a CHANGED
1
2
@@ -2,5 +2,5 @@
1
2
-3
+edited-too
4
5
@@ -5,4 +5,4 @@
4
5
-6
+edited-too
7
@@ -8,4 +8,1 @@
7
-8
-9
-10
\ No newline at end of file
+8
\ No newline at end of file
[stage] Unstaged changes to 'a' - line 12 of 33 100%
EOF
|