diff options
author | Peter A. Bigot <pab@peoplepowerco.com> | 2010-05-05 09:58:22 -0700 |
---|---|---|
committer | Peter A. Bigot <pab@peoplepowerco.com> | 2010-05-05 09:58:22 -0700 |
commit | 8b83ccd4a9ad5342e13cb8331a20b07fad862c65 (patch) | |
tree | ed8a0f0142c2ba1c9627d9ca652ef0f7722e22cf /tests | |
parent | 857dd3322b0a24b247e3b41c6c986fa4c9f33c82 (diff) |
Check flag only if relevant; add test to verify fix
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bindings/test-constraints.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/bindings/test-constraints.py b/tests/bindings/test-constraints.py index 22dc87d..b3f8094 100644 --- a/tests/bindings/test-constraints.py +++ b/tests/bindings/test-constraints.py @@ -227,5 +227,12 @@ class testWhitespace (unittest.TestCase): self.assertEqual("test", CollapseString(u"\ttest\n\r")) self.assertEqual("test too", CollapseString(u"\ttest\n\rtoo\n")) + def testApplyWhitespace (self): + goal = 'one two' + source = ' one two ' + self.assertEqual(goal, CollapseString(goal)) + self.assertEqual(goal, CollapseString(source)) + self.assertEqual(source, CollapseString(source, _apply_whitespace_facet=False)) + if __name__ == '__main__': unittest.main() |