-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest08.sh
74 lines (58 loc) · 1.46 KB
/
test08.sh
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
#!/bin/dash
# if .girt directory exist already, remove it for testing
if test -d ".girt/"
then
rm -r ".girt/"
fi
###exploring girt-status with different delete status###
echo ""
echo "<<<<<<<<<<<<<<<START>>>>>>>>>>>>>>>"
echo ""
# error - call before init
sh girt-status
test $? -eq 1 || echo "FAILED"
sh girt-init
touch a b c d e f g h
echo "***STATUS 1***"
sh girt-status # => all files untracked
echo "***STATUS 1***"
sh girt-add a b c
echo "***STATUS 2***"
sh girt-status # => a, b and c added to index - the rest untracked
echo "***STATUS 2***"
sh girt-commit -m "commit-0"
echo "***STATUS 3***"
sh girt-status # => a, b and c same as repo - the rest untracked
echo "***STATUS 3***"
sh girt-add d
seq 1 10 >> d
echo "***STATUS 4***"
sh girt-status
# => a, b and c same as repo - d (added to index - file changed) - the rest untracked
echo "***STATUS 4***"
sh girt-commit -m "commit-1"
echo "***STATUS 5***"
sh girt-status
# => a, b and c same as repo
# d file changed, changes not staged for commit
# rest untracked
echo "***STATUS 5***"
sh girt-add d
echo "***STATUS 6***"
sh girt-status
# => a, b and c same as repo
# d file changed, changes staged for commit
# rest untracked
echo "***STATUS 6***"
seq 20 30 >> d
echo "***STATUS 7***"
sh girt-status
# => a, b and c same as repo
# d file changed, different changes staged for commit
# rest untracked
echo "***STATUS 7***"
rm -r .girt
rm a b c d e f g h
echo ""
echo "<<<<<<<<<<<<<<<END>>>>>>>>>>>>>>>"
echo ""