Re: Updated Issue 212 - sync needs list of include patterns (monotone)

Stephen Leake <[email protected]>
Newsgroups gmane.comp.version-control.monotone.devel
Message-ID <[email protected]>
Stephen Leake <[email protected]> writes:

> I added a unit test in monotone/test/unit/tests/uri.cc that demonstrates
> this:
>
>   test_one_uri("mtn://venge.net/monotone?include1;-exclude1;-exclude2;include2",
>                "mtn", "", "venge.net", "", "/monotone",
>                "{include1,include2}", "{exclude1,exclude2}");

Arg. I forgot that you have to compile unit_tester.exe in order to run a
new unit test; this test fails.

And it would not prove this works; it's only testing the URI parsing at
a lexical level; the query is 'include1;-exclude1;-exclude2;include2'.

So I added a lua test, which does show that it works (not commited yet):

check(mtn2("pull", srv.url .. "?-branch1;branch2;-branch3;branch4"), 0, nil, true)
check(qgrep("include pattern  '{branch2,branch4}'", "stderr"))
check(qgrep("exclude pattern  '{branch1,branch3}'", "stderr"))


-- 
-- Stephe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.