summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYu-Jie Lin <livibetter@gmail.com>2013-08-18 14:37:29 +0800
committerYu-Jie Lin <livibetter@gmail.com>2013-08-18 14:37:29 +0800
commit6cb3c2168e537df23ab13dcde54d523c1c8fb39c (patch)
tree4f66d069c96d02d0f172604b351ec8ffb6f55a05 /tests
parent8141e0b553a39f03af332c58fb78af8eb1b65253 (diff)
downloadsmartypants-6cb3c2168e537df23ab13dcde54d523c1c8fb39c.tar.gz
add --skip to command-line for skipped elements
Diffstat (limited to 'tests')
-rw-r--r--tests/test_cli.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 0cf29dc..69b9e4d 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -48,6 +48,26 @@ class TestCLI(unittest.TestCase):
output = self._p([CLI_SCRIPT, '--attr', 'b'], T)
self.assertEquals(output, E)
+ def test_skipped_elements(self):
+
+ T = '<a>"foo"</a> <b>"bar"</b>'
+
+ E = '<a>&#8220;foo&#8221;</a> <b>&#8220;bar&#8221;</b>'
+ output = self._p([CLI_SCRIPT], T)
+ self.assertEquals(output, E)
+
+ E = '<a>"foo"</a> <b>&#8220;bar&#8221;</b>'
+ output = self._p([CLI_SCRIPT, '--skip', 'a'], T)
+ self.assertEquals(output, E)
+
+ E = '<a>&#8220;foo&#8221;</a> <b>"bar"</b>'
+ output = self._p([CLI_SCRIPT, '--skip', 'b'], T)
+ self.assertEquals(output, E)
+
+ E = T
+ output = self._p([CLI_SCRIPT, '--skip', 'a,b'], T)
+ self.assertEquals(output, E)
+
def test_file(self):
T = '"foobar"'