[ditrack commit] r2343 - src/trunk/tests/cmd-new/auto-commit.tc
Vlad Skvortsov
vss at 73rus.com
Mon Nov 26 23:43:36 PST 2007
gli at ditrack.org wrote:
> Author: gli
> Date: 2007-11-12 08:31:01 -0800 (Mon, 12 Nov 2007)
> New Revision: 2343
>
> Removed:
> 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?
> Modified:
> src/trunk/tests/cmd-new/auto-commit.tc/new.expected.lma
> src/trunk/tests/cmd-new/auto-commit.tc/test.py
> Log:
> 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 @@
> Choose the issue category:
> -1) sample
> +1) sample-category
> +2) sample-category2
> a) abort
> > Choose the version the issue is reported against:
> 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 @@
> -Choose the issue category:
> -1) sample
> -a) abort
> -> Choose the version the issue is reported against:
> -1) 0.3
> -2) 0.4
> -a) abort
> -> Enter the issue title:
> -> Choose the version the issue is due:
> -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
> Commit at lists.ditrack.org
> http://lists.ditrack.org/mailman/listinfo/commit
>
--
Vlad Skvortsov, vss at 73rus.com, http://vss.73rus.com
More information about the Dev
mailing list