Beispiel #1
0
 def test_pattern_to_glob_variable_as_wildcard(self):
     result = pattern_to_glob("a${VariableName}a")
     self.assertEquals(result, ("a*a", ["${VariableName}"]))
Beispiel #2
0
 def test_pattern_to_glob_variable_as_literal(self):
     result = pattern_to_glob("a${VariableName}a", False)
     self.assertEquals(result, ("a${VariableName}a", []))
Beispiel #3
0
 def test_pattern_to_glob_wildcard_multiple(self):
     result = pattern_to_glob("a*a")
     self.assertEquals(result, ("a*a", ["*"]))
Beispiel #4
0
 def test_pattern_to_glob_wildcard_single(self):
     result = pattern_to_glob("a?a")
     self.assertEquals(result, ("a?a", ["?"]))
Beispiel #5
0
 def test_pattern_to_glob_escaped_backslash(self):
     result = pattern_to_glob("\\")
     self.assertEquals(result, ("\\\\", []))
Beispiel #6
0
 def test_pattern_to_glob_escaped_questionmark(self):
     result = pattern_to_glob("${?}")
     self.assertEquals(result, ("\\?", []))
Beispiel #7
0
 def test_pattern_to_glob_escaped_star(self):
     result = pattern_to_glob("${*}")
     self.assertEquals(result, ("\\*", []))
Beispiel #8
0
 def test_pattern_to_glob_escaped_dollarsign(self):
     result = pattern_to_glob("${$}")
     self.assertEquals(result, ("$", []))
Beispiel #9
0
 def test_pattern_to_glob_blank(self):
     result = pattern_to_glob("")
     self.assertEquals(result, ("", []))