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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
#!/bin/sh
. libtest.sh
. libgit.sh
export LINES=15
export COLUMNS=80
steps '
:set vertical-split = no
:view-tree
:save-display root-dir.screen
:enter
:save-display first-child-dir.screen
:enter
:3
:enter
:save-display second-child-dir.screen
:3
:enter
:save-display second-child-dir-first-file.screen
'
test_setup_work_dir()
{
mkdir -p -- "-- foo bar"
touch -- "-- foo bar/-- boo far"
touch -- "-- foo bar/as测试asd"
mkdir -p -- "-foo"
printf 'OK\n' > "-foo/-bar"
touch -- "-foo/-bar"
git add .
git_commit -m "Initial"
}
git_init
test_tig
assert_equals 'root-dir.screen' <<EOF
Directory path /
drwxr-xr-x Committer 2009-02-13 23:31 +0000 -- foo bar
drwxr-xr-x Committer 2009-02-13 23:31 +0000 -foo
[tree] 9aedb94abc2d704ba5c2182f882c5743e9d1e386 - file 1 of 2 100%
EOF
assert_equals 'first-child-dir.screen' <<EOF
Directory path /-- foo bar/
drwxr-xr-x ..
-rw-r--r-- Committer 0 2009-02-13 23:31 +0000 -- boo far
-rw-r--r-- 0 /as\346\265\213\350\257\225asd"
[tree] Open parent directory 100%
EOF
assert_equals 'second-child-dir.screen' <<EOF
Directory path /-foo/
drwxr-xr-x ..
-rw-r--r-- Committer 3 2009-02-13 23:31 +0000 -bar
[tree] Open parent directory 100%
EOF
assert_equals 'second-child-dir-first-file.screen' <<EOF
Directory path /-foo/
drwxr-xr-x ..
-rw-r--r-- Committer 3 2009-02-13 23:31 +0000 -bar
[tree] d86bac9de59abcc26bc7956c1e842237c7581859 - file 1 of 1 100%
OK
[blob] -foo/-bar - line 1 of 1 100%
EOF
|