From 0e11260d65ce320403a375c091752b13e2604820 Mon Sep 17 00:00:00 2001 From: weijunjie Date: Wed, 24 Jul 2019 20:18:52 +0800 Subject: [PATCH] add ut --- test_nginxfmt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_nginxfmt.py b/test_nginxfmt.py index 0de6c8f..69c1f83 100644 --- a/test_nginxfmt.py +++ b/test_nginxfmt.py @@ -91,9 +91,11 @@ class TestFormatter(unittest.TestCase): def test_apply_bracket_template_tags(self): self.assertEqual("\"aaa___TEMPLATE_BRACKET_OPENING_TAG___dd___TEMPLATE_BRACKET_CLOSING_TAG___bbb\"", apply_bracket_template_tags("\"aaa{dd}bbb\"")) + self.assertEqual("\"aaa___TEMPLATE_BRACKET_OPENING_TAG___dd___TEMPLATE_BRACKET_CLOSING_TAG___bbb\"cc{cc}cc\"dddd___TEMPLATE_BRACKET_OPENING_TAG___eee___TEMPLATE_BRACKET_CLOSING_TAG___fff\"", apply_bracket_template_tags("\"aaa{dd}bbb\"cc{cc}cc\"dddd{eee}fff\"")) def test_strip_bracket_template_tags(self): self.assertEqual("\"aaa{dd}bbb\"", strip_bracket_template_tags("\"aaa___TEMPLATE_BRACKET_OPENING_TAG___dd___TEMPLATE_BRACKET_CLOSING_TAG___bbb\"")) + self.assertEqual("\"aaa{dd}bbb\"cc{cc}cc\"dddd{eee}fff\"", apply_bracket_template_tags("\"aaa___TEMPLATE_BRACKET_OPENING_TAG___dd___TEMPLATE_BRACKET_CLOSING_TAG___bbb\"cc{cc}cc\"dddd___TEMPLATE_BRACKET_OPENING_TAG___eee___TEMPLATE_BRACKET_CLOSING_TAG___fff\"")) def test_variable_template_tags(self): self.assertEqual("foo bar ___TEMPLATE_VARIABLE_OPENING_TAG___myvar___TEMPLATE_VARIABLE_CLOSING_TAG___",