chiark
/
gitweb
/
~mdw
/
stgit
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cd41b7d
)
Add some more tests of "stg status" output
author
David Kågedal
<davidk@lysator.liu.se>
Fri, 14 Sep 2007 22:31:14 +0000
(
00:31
+0200)
committer
Karl Hasselström
<kha@treskal.com>
Sun, 23 Sep 2007 22:54:06 +0000
(
00:54
+0200)
Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Karl Hasselström <kha@treskal.com>
t/t0002-status.sh
patch
|
blob
|
blame
|
history
diff --git
a/t/t0002-status.sh
b/t/t0002-status.sh
index ce3b68886cf1ce8dc5c75b689161ae21f8a4c90c..d0c31b250926482e113c32b59a9d01cc0cf95b05 100755
(executable)
--- a/
t/t0002-status.sh
+++ b/
t/t0002-status.sh
@@
-59,6
+59,14
@@
test_expect_success 'Status with an added file' '
diff -u expected.txt output.txt
'
diff -u expected.txt output.txt
'
+cat > expected.txt <<EOF
+foo/bar
+EOF
+test_expect_success 'Status with an added file and -n option' '
+ stg status -n > output.txt &&
+ diff -u expected.txt output.txt
+'
+
cat > expected.txt <<EOF
EOF
test_expect_success 'Status after refresh' '
cat > expected.txt <<EOF
EOF
test_expect_success 'Status after refresh' '
@@
-85,6
+93,12
@@
test_expect_success 'Status after refresh' '
diff -u expected.txt output.txt
'
diff -u expected.txt output.txt
'
+test_expect_success 'Add another file' '
+ echo lajbans > fie &&
+ stg add fie &&
+ stg refresh
+'
+
test_expect_success 'Make a conflicting patch' '
stg pop &&
stg new -m "third patch" &&
test_expect_success 'Make a conflicting patch' '
stg pop &&
stg new -m "third patch" &&
@@
-104,6
+118,28
@@
test_expect_success 'Status after conflicting push' '
diff -u expected.txt output.txt
'
diff -u expected.txt output.txt
'
+cat > expected.txt <<EOF
+C foo/bar
+EOF
+test_expect_success 'Status of file' '
+ stg status foo/bar > output.txt &&
+ diff -u expected.txt output.txt
+'
+
+cat > expected.txt <<EOF
+EOF
+test_expect_success 'Status of dir' '
+ stg status foo > output.txt &&
+ diff -u expected.txt output.txt
+'
+
+cat > expected.txt <<EOF
+EOF
+test_expect_success 'Status of other file' '
+ stg status fie > output.txt &&
+ diff -u expected.txt output.txt
+'
+
cat > expected.txt <<EOF
M foo/bar
EOF
cat > expected.txt <<EOF
M foo/bar
EOF