Esempio n. 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.                    "
     )
Esempio n. 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"
     )
Esempio n. 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.                    "
     )
Esempio n. 4
0
 def test_incomplete(self):
     self.assertEqual(
         nested_inlinefuncs.parse_inlinefunc(
             "testing $blah{without an ending."),
         "testing $blah{without an ending.")
Esempio n. 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.")
Esempio n. 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.                    ")
Esempio n. 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}")
Esempio n. 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.                    ")
Esempio n. 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")
Esempio n. 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.")
Esempio n. 11
0
 def test_incomplete(self):
     self.assertEqual(nested_inlinefuncs.parse_inlinefunc(
         "testing $blah{without an ending."),
         "testing $blah{without an ending.")
Esempio n. 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}")