示例#1
0
文件: tests.py 项目: wty0512/evennia
 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
文件: tests.py 项目: wty0512/evennia
 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
文件: tests.py 项目: wty0512/evennia
 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
文件: tests.py 项目: wty0512/evennia
 def test_incomplete(self):
     self.assertEqual(
         nested_inlinefuncs.parse_inlinefunc(
             "testing $blah{without an ending."),
         "testing $blah{without an ending.")
示例#5
0
文件: tests.py 项目: wty0512/evennia
 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
文件: tests.py 项目: 325975/evennia
 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
文件: tests.py 项目: wty0512/evennia
 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
文件: tests.py 项目: 325975/evennia
 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
文件: tests.py 项目: 325975/evennia
 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
文件: tests.py 项目: 325975/evennia
 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
文件: tests.py 项目: 325975/evennia
 def test_incomplete(self):
     self.assertEqual(nested_inlinefuncs.parse_inlinefunc(
         "testing $blah{without an ending."),
         "testing $blah{without an ending.")
示例#12
0
文件: tests.py 项目: 325975/evennia
 def test_nofunc(self):
     self.assertEqual(nested_inlinefuncs.parse_inlinefunc(
         "as$382ewrw w we w werw,|44943}"),
         "as$382ewrw w we w werw,|44943}")