3 # Test main view display of index changes and interaction with the stage view.
13 :save-display main-with-unstaged.screen
16 :save-display main-with-unstaged-split.screen
20 :save-display main-with-staged.screen
24 :save-display main-with-staged-split.screen
30 :save-display main-with-staged-and-unstaged.screen
34 set vertical-split = no
35 bind generic <F1> @sh -c 'git reset a b.c'
40 echo "*.o" > .gitignore
41 echo "*~" > .git/info/exclude
43 for file in a b.c "d~" e/f "g h" i.o .j "h~/k"; do
44 dir="$(dirname "$file")"
45 [ -n "$dir" ] && mkdir -p "$dir"
46 printf "%s\n%s" "$file" "$(seq 1 10)" > "$file"
50 git_commit --author="$IDENT_A" --message="Initial commit"
52 for file in a b.c "d~" e/f "g h" i.o .j "h~/k"; do
53 printf "%s\n%s" "$file CHANGED" "$(seq 1 8)" > "$file"
58 in_work_dir prepare_git_repo
62 YYY_MM_DD_HH_MM="$(date +"%Y-%m-%d %H:%M")"
64 assert_equals 'main-with-unstaged.screen' <<EOF
65 $YYY_MM_DD_HH_MM Unknown o Unstaged changes
66 2009-02-13 23:31 A. U. Thor I [master] Initial commit
79 [main] Unstaged changes 100%
82 assert_equals 'main-with-unstaged-split.screen' <<EOF
83 $YYY_MM_DD_HH_MM Unknown o Unstaged changes
84 2009-02-13 23:31 A. U. Thor I [master] Initial commit
87 [main] Unstaged changes 100%
93 5 files changed, 10 insertions(+), 20 deletions(-)
96 index e697dfd..9d8ef3d 100644
97 [stage] Unstaged changes - line 1 of 107 8%
100 assert_equals 'main-with-staged.screen' <<EOF
101 $YYY_MM_DD_HH_MM Unknown o Staged changes
102 2009-02-13 23:31 A. U. Thor I [master] Initial commit
115 [main] Staged changes 100%
118 assert_equals 'main-with-staged-split.screen' <<EOF
119 $YYY_MM_DD_HH_MM Unknown o Staged changes
120 2009-02-13 23:31 A. U. Thor I [master] Initial commit
123 [main] Staged changes 100%
129 5 files changed, 10 insertions(+), 20 deletions(-)
132 index e697dfd..9d8ef3d 100644
133 [stage] Staged changes - line 1 of 107 8%
136 assert_equals 'main-with-staged-and-unstaged.screen' <<EOF
137 $YYY_MM_DD_HH_MM Unknown o Staged changes
138 $YYY_MM_DD_HH_MM Unknown o Unstaged changes
139 2009-02-13 23:31 A. U. Thor I [master] Initial commit
151 [main] Staged changes 100%