Example #1
0
 def testDescribeUnixExecutable(self):
     msg = explain("wget --recursive")
     self.assertEqual(msg, '\n'.join([
         PREAMBLE,
         "--recursive (-r): specify recursive download.",
         ""
     ]))
Example #2
0
 def testNoShowShortnameIfOptHasNoShortname(self):
     msg = explain("wget --retry-connrefused")
     self.assertEqual(msg, '\n'.join([
         PREAMBLE,
         "--retry-connrefused: retry even if connection is refused.",
         ""
     ]))
Example #3
0
 def testAcceptLongPS1Header(self):
     msg = explain("johnny-o-user:2014 05 06:>>> wget --recursive")
     self.assertEqual(msg, '\n'.join([
         PREAMBLE,
         "--recursive (-r): specify recursive download.",
         ""
     ]))
Example #4
0
 def testAcceptPathToExecutable(self):
     msg = explain("dir1/dir2/wget --recursive")
     self.assertEqual(msg, '\n'.join([
         PREAMBLE,
         "--recursive (-r): specify recursive download.",
         ""
     ]))
Example #5
0
 def testDescribeOptionCombination(self):
     msg = explain("wget --recursive -A *.jpg -l3 http://google.com")
     self.assertEqual(msg, '\n'.join([
         PREAMBLE + " This command downloads the page at http://google.com.",
         "Recursively scrape web pages linked from http://google.com of type '*.jpg', following links 3 times.",
         "--recursive (-r): specify recursive download.",
         "--accept (-A): *.jpg is a comma-separated list of accepted extensions.",
         "--level (-l): 3 is a maximum recursion depth (inf or 0 for infinite).",
         ""
     ]))
Example #6
0
 def testDescribeUrl(self):
     msg = explain("wget http://google.com")
     self.assertEqual(msg, '\n'.join([
         PREAMBLE + " This command downloads the page at http://google.com.",
         ""
     ]))