Exemplo n.º 1
0
 def testQuote(self):
     parser = YokadiOptionParser()
     src = u"There's a quote here"
     options, args = parser.parse_args(src)
     # Recreate the line
     line = " ".join(args)
     self.assertEqual(line, src)
Exemplo n.º 2
0
 def testDash(self):
     parser = YokadiOptionParser()
     srcs = ["foo-bar", "foo - bar", "foo -bar", "--bar -f"]
     for src in srcs:
         options, args = parser.parse_args(src)
         # Recreate the line
         line = " ".join(args)
         if src.startswith("-- "):
             src = src[3:]
         self.assertEqual(line, src)
Exemplo n.º 3
0
 def testEmptyLine(self):
     parser = YokadiOptionParser()
     options, args = parser.parse_args(u'')
     self.assertEqual(args, [])