On Tue, 2012-04-17 at 15:24 +0200, Krzesimir Nowak wrote:
Some comment on that.
D-Bus Testing: added testMatchTemplate
------------------------------ test/test-dbus.py ------------------------------
index 21f69f3..d9abf2d 100755
@@ -4083,6 +4083,40 @@ sources/todo/config.ini:# databasePassword =
'''.format(
out, err, code = self.runCmdline(["--template", "? "])
self.assertEqualDiff(expected, out)
self.assertEqual(err, '')
+ # TODO: better directory name? reuse some copied&patched testcases? see src.am
+ @property("ENV",
"SYNCEVOLUTION_TEMPLATE_DIR=templates_from_test_testcases")
+ @property("debug", False)
+ def testMatchTemplate(self):
test/testcases/templates are the templates used for the Cmdline.cpp
tests. Copy the files to test/test-dbus/templates so that there is a
templates dir inside it. Use "SYNCEVOLUTION_TEMPLATE_DIR=" + xdg_root +
"/templates". Then in the test itself, call
self.setUpFiles('templates'). That should make the D-Bus server use the
test templates instead of the installed ones - completely untested,
though.
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.