Пример #1
0
 def test_escaped2(self):
     self.assertEqual(
         nested_inlinefuncs.parse_inlinefunc(
             'this should be $pad("""escaped,""" and """instead,""" cropped $crop(with a long,5) text., 80)'
         ),
         "this should be                    escaped, and instead, cropped with  text.                    "
     )
Пример #2
0
 def test_nested(self):
     self.assertEqual(
         nested_inlinefuncs.parse_inlinefunc(
             "this $crop(is a test with $pad(padded, 20) text in $pad(pad2, 10) a crop, 80)"
         ),
         "this is a test with        padded        text in    pad2    a crop"
     )
Пример #3
0
 def test_escaped(self):
     self.assertEqual(
         nested_inlinefuncs.parse_inlinefunc(
             "this should be $pad('''escaped,''' and '''instead,''' cropped $crop(with a long,5) text., 80)"
         ),
         "this should be                    escaped, and instead, cropped with  text.                    "
     )
Пример #4
0
 def test_incomplete(self):
     self.assertEqual(
         nested_inlinefuncs.parse_inlinefunc(
             "testing $blah{without an ending."),
         "testing $blah{without an ending.")
Пример #5
0
 def test_single_func(self):
     self.assertEqual(
         nested_inlinefuncs.parse_inlinefunc(
             "this is a test with $pad(centered, 20) text in it."),
         "this is a test with       centered       text in it.")
Пример #6
0
 def test_escaped2(self):
     self.assertEqual(nested_inlinefuncs.parse_inlinefunc(
         'this should be $pad("""escaped,""" and """instead,""" cropped $crop(with a long,5) text., 80)'),
         "this should be                    escaped, and instead, cropped with  text.                    ")
Пример #7
0
 def test_nofunc(self):
     self.assertEqual(
         nested_inlinefuncs.parse_inlinefunc(
             "as$382ewrw w we w werw,|44943}"),
         "as$382ewrw w we w werw,|44943}")
Пример #8
0
 def test_escaped(self):
     self.assertEqual(nested_inlinefuncs.parse_inlinefunc(
         "this should be $pad('''escaped,''' and '''instead,''' cropped $crop(with a long,5) text., 80)"),
         "this should be                    escaped, and instead, cropped with  text.                    ")
Пример #9
0
 def test_nested(self):
     self.assertEqual(nested_inlinefuncs.parse_inlinefunc(
         "this $crop(is a test with $pad(padded, 20) text in $pad(pad2, 10) a crop, 80)"),
         "this is a test with        padded        text in    pad2    a crop")
Пример #10
0
 def test_single_func(self):
     self.assertEqual(nested_inlinefuncs.parse_inlinefunc(
         "this is a test with $pad(centered, 20) text in it."),
         "this is a test with       centered       text in it.")
Пример #11
0
 def test_incomplete(self):
     self.assertEqual(nested_inlinefuncs.parse_inlinefunc(
         "testing $blah{without an ending."),
         "testing $blah{without an ending.")
Пример #12
0
 def test_nofunc(self):
     self.assertEqual(nested_inlinefuncs.parse_inlinefunc(
         "as$382ewrw w we w werw,|44943}"),
         "as$382ewrw w we w werw,|44943}")