Discussion:
[ditrack commit] r2343 - src/trunk/tests/cmd-new/auto-commit.tc
Vlad Skvortsov
2007-11-27 07:43:36 UTC
Permalink
Author: gli
Date: 2007-11-12 08:31:01 -0800 (Mon, 12 Nov 2007)
New Revision: 2343
src/trunk/tests/cmd-new/auto-commit.tc/commit.expected
src/trunk/tests/cmd-new/auto-commit.tc/log.expected
src/trunk/tests/cmd-new/auto-commit.tc/new.expected.wc
Why don't we check the output of the 'new' command in a test case
related to that?
src/trunk/tests/cmd-new/auto-commit.tc/new.expected.lma
src/trunk/tests/cmd-new/auto-commit.tc/test.py
work on i#188. Use a.gz instead of empty.gz
Deleted: src/trunk/tests/cmd-new/auto-commit.tc/commit.expected
===================================================================
--- src/trunk/tests/cmd-new/auto-commit.tc/commit.expected 2007-11-12 15:56:21 UTC (rev 2342)
+++ src/trunk/tests/cmd-new/auto-commit.tc/commit.expected 2007-11-12 16:31:01 UTC (rev 2343)
@@ -1 +0,0 @@
-Local i#A committed as i#1.
Deleted: src/trunk/tests/cmd-new/auto-commit.tc/log.expected
===================================================================
--- src/trunk/tests/cmd-new/auto-commit.tc/log.expected 2007-11-12 15:56:21 UTC (rev 2342)
+++ src/trunk/tests/cmd-new/auto-commit.tc/log.expected 2007-11-12 16:31:01 UTC (rev 2343)
@@ -1,3 +0,0 @@
-i#1 added: title
-(assigned to sample-user, due in 0.5)
-------------------------------------------------------------------------
Modified: src/trunk/tests/cmd-new/auto-commit.tc/new.expected.lma
===================================================================
--- src/trunk/tests/cmd-new/auto-commit.tc/new.expected.lma 2007-11-12 15:56:21 UTC (rev 2342)
+++ src/trunk/tests/cmd-new/auto-commit.tc/new.expected.lma 2007-11-12 16:31:01 UTC (rev 2343)
@@ -1,5 +1,6 @@
-1) sample
+1) sample-category
+2) sample-category2
a) abort
1) 0.3
Deleted: src/trunk/tests/cmd-new/auto-commit.tc/new.expected.wc
===================================================================
--- src/trunk/tests/cmd-new/auto-commit.tc/new.expected.wc 2007-11-12 15:56:21 UTC (rev 2342)
+++ src/trunk/tests/cmd-new/auto-commit.tc/new.expected.wc 2007-11-12 16:31:01 UTC (rev 2343)
@@ -1,13 +0,0 @@
-1) sample
-a) abort
-1) 0.3
-2) 0.4
-a) abort
-1) 0.5
-2) 0.6
-a) abort
-> New local issue #B committed as i#1
Modified: src/trunk/tests/cmd-new/auto-commit.tc/test.py
===================================================================
--- src/trunk/tests/cmd-new/auto-commit.tc/test.py 2007-11-12 15:56:21 UTC (rev 2342)
+++ src/trunk/tests/cmd-new/auto-commit.tc/test.py 2007-11-12 16:31:01 UTC (rev 2343)
@@ -14,7 +14,7 @@
expected = [
("Owned-by", "sample-user"),
("Title", "title"),
- ("Category", "sample"),
+ ("Category", "sample-category"),
("Status", "open"),
("Reported-for", "0.3"),
("Due-in", "0.5"),
@@ -22,7 +22,7 @@
# Local issue
-tc = dttest.testcase(repo="empty.gz")
+tc = dttest.testcase(repo="a.gz")
descr="Issue A description\n"
tc.new_issue("edit", issue_descr=descr, output="new.output.lma")
@@ -35,12 +35,20 @@
# Commited issue
descr = "Issue 1 description\n"
-tc.new_issue("edit", issue_descr=descr, output="new.output.wc", local=False)
-tc.diff("new.expected.wc", "new.output.wc")
+issue_id = \
+ int(tc.new_issue("edit", issue_descr=descr, output="new.output.wc", local=False))
-headers, text = tc.wc_issue(1)
+line = open("new.output.wc", "r").readlines()[-1]
+assert (line == "> New local issue #B committed as i#%d\n" % issue_id)
+
+headers, text = tc.wc_issue(issue_id)
check_issue(headers)
assert(text == descr)
log = tc.svn_log_last(meta=False, outfile="log.output")
+open("log.expected", "w").write("""\
+i#%d added: title
+(assigned to sample-user, due in 0.5)
+------------------------------------------------------------------------
+""" % issue_id)
tc.diff("log.expected", "log.output")
_______________________________________________
Commit mailing list
http://lists.ditrack.org/mailman/listinfo/commit
--
Vlad Skvortsov, vss-***@public.gmane.org, http://vss.73rus.com
Ivan Glushkov
2007-11-27 21:29:00 UTC
Permalink
Post by Vlad Skvortsov
Author: gli
Date: 2007-11-12 08:31:01 -0800 (Mon, 12 Nov 2007)
New Revision: 2343
src/trunk/tests/cmd-new/auto-commit.tc/commit.expected
src/trunk/tests/cmd-new/auto-commit.tc/log.expected
src/trunk/tests/cmd-new/auto-commit.tc/new.expected.wc
Why don't we check the output of the 'new' command in a test case
related to that?
We do.
1. We check that output of the new for the case when local = True
2. For the case "local=False" we check the last string of output to
find out the number of new assigned id.
Vlad Skvortsov
2008-01-19 01:11:30 UTC
Permalink
Post by Ivan Glushkov
Post by Vlad Skvortsov
Author: gli
Date: 2007-11-12 08:31:01 -0800 (Mon, 12 Nov 2007)
New Revision: 2343
src/trunk/tests/cmd-new/auto-commit.tc/commit.expected
src/trunk/tests/cmd-new/auto-commit.tc/log.expected
src/trunk/tests/cmd-new/auto-commit.tc/new.expected.wc
Why don't we check the output of the 'new' command in a test case
related to that?
We do.
1. We check that output of the new for the case when local = True
Ok.
Post by Ivan Glushkov
2. For the case "local=False" we check the last string of output to
find out the number of new assigned id.
I think it's insufficient. It would be okay in other testcases, but
since here we specifically test the 'new' command, I believe that we
need to be very thorough about that.
--
Vlad Skvortsov, vss-***@public.gmane.org, http://vss.73rus.com
Loading...