Commits

Anonymous committed 5d40246

1.1.2dev: Merged [12009] from 1.0-stable.

  • Participants
  • Parent commits a06dc71

Comments (0)

Files changed (3)

     import trac.admin.tests
     import trac.db.tests
     import trac.mimeview.tests
+    import trac.timeline.tests
     import trac.ticket.tests
     import trac.util.tests
     import trac.versioncontrol.tests
     suite.addTest(trac.db.tests.suite())
     suite.addTest(trac.mimeview.tests.suite())
     suite.addTest(trac.ticket.tests.suite())
+    suite.addTest(trac.timeline.tests.suite())
     suite.addTest(trac.util.tests.suite())
     suite.addTest(trac.versioncontrol.tests.suite())
     suite.addTest(trac.versioncontrol.web_ui.tests.suite())

trac/timeline/tests/__init__.py

 # individuals. For the exact contribution history, see the revision
 # history and logs, available at http://trac.edgewall.org/log/.
 
+import unittest
+
+from trac.timeline.tests import wikisyntax
 from trac.timeline.tests.functional import functionalSuite
+
+
+def suite():
+    suite = unittest.TestSuite()
+    suite.addTest(wikisyntax.suite())
+    return suite
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='suite')

trac/timeline/tests/wikisyntax.py

+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2013 Edgewall Software
+# All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at http://trac.edgewall.org/wiki/TracLicense.
+#
+# This software consists of voluntary contributions made by many
+# individuals. For the exact contribution history, see the revision
+# history and logs, available at http://trac.edgewall.org/log/.
+
+import unittest
+
+from trac.timeline.web_ui import TimelineModule
+from trac.wiki.tests import formatter
+
+TIMELINE_TEST_CASES = u"""
+============================== timeline: link resolver
+timeline:2008-01-29
+timeline:2008-01-29T15:48
+timeline:2008-01-29T15:48Z
+timeline:2008-01-29T16:48+01
+timeline:2008-01-0A
+------------------------------
+<p>
+<a class="timeline" href="/timeline?from=2008-01-29T00%3A00%3A00Z" title="See timeline at 2008-01-29T00:00:00Z">timeline:2008-01-29</a>
+<a class="timeline" href="/timeline?from=2008-01-29T15%3A48%3A00Z&amp;precision=minutes" title="See timeline at 2008-01-29T15:48:00Z">timeline:2008-01-29T15:48</a>
+<a class="timeline" href="/timeline?from=2008-01-29T15%3A48%3A00Z&amp;precision=minutes" title="See timeline at 2008-01-29T15:48:00Z">timeline:2008-01-29T15:48Z</a>
+<a class="timeline" href="/timeline?from=2008-01-29T15%3A48%3A00Z&amp;precision=seconds" title="See timeline at 2008-01-29T15:48:00Z">timeline:2008-01-29T16:48+01</a>
+<a class="timeline missing" title="&#34;2008-01-0A&#34; is an invalid date, or the date format is not known. Try &#34;MM/DD/YY&#34; instead.">timeline:2008-01-0A</a>
+</p>
+------------------------------
+"""
+
+
+def suite():
+    suite = unittest.TestSuite()
+    suite.addTest(formatter.suite(TIMELINE_TEST_CASES, file=__file__))
+    return suite
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='suite')