mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Tests: Added 'dom.tag.N' tests
This commit is contained in:
parent
80565938ed
commit
8ec28d2b48
1 changed files with 10 additions and 0 deletions
10
test/dom.t
10
test/dom.t
|
@ -139,6 +139,16 @@ class TestDOM(TestCase):
|
|||
code, out, err = self.t("get dom.tag.count")
|
||||
self.assertEqual('2\n', out)
|
||||
|
||||
def test_dom_tag_N_none(self):
|
||||
"""Test dom.tag.N with no data"""
|
||||
code, out, err = self.t.runError("get dom.tag.1")
|
||||
self.assertIn("DOM reference 'dom.tag.1' is not valid.", err)
|
||||
|
||||
def test_dom_tag_N_two(self):
|
||||
"""Test dom.tag.N with two tags"""
|
||||
self.t("start one two")
|
||||
code, out, err = self.t("get dom.tag.2")
|
||||
self.assertEqual('two\n', out)
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue