Skip to content

Commit 115e2a1

Browse files
committed
🧪 Add tests for Firefox 144 - failing unless on 144+
1 parent d1852e8 commit 115e2a1

8 files changed

Lines changed: 64 additions & 2 deletions

File tree

‎tests/csv.t‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,34 @@ class TestCSV(unittest.TestCase):
144144
output = lib.run(cmd, stdin=self.pwd)
145145
self.validate_vertbar(output)
146146

147+
def test_firefox_144_default(self):
148+
test = os.path.join(self.test, "test_profile_firefox_144")
149+
150+
cmd = lib.get_script() + [test, "--format", "csv"]
151+
output = lib.run(cmd, stdin=self.pwd)
152+
self.validate_default(output)
153+
154+
def test_firefox_144_tabular(self):
155+
test = os.path.join(self.test, "test_profile_firefox_144")
156+
157+
cmd = lib.get_script() + [test, "--format", "tabular"]
158+
output = lib.run(cmd, stdin=self.pwd)
159+
self.validate_tabular(output)
160+
161+
def test_firefox_144_semicol(self):
162+
test = os.path.join(self.test, "test_profile_firefox_144")
163+
164+
cmd = lib.get_script() + [test, "--format", "csv", "--csv-delimiter", ";", "--csv-quotechar", "'"]
165+
output = lib.run(cmd, stdin=self.pwd)
166+
self.validate_semicol(output)
167+
168+
def test_firefox_144_vertbar(self):
169+
test = os.path.join(self.test, "test_profile_firefox_144")
170+
171+
cmd = lib.get_script() + [test, "--format", "csv", "--csv-delimiter", "\t", "--csv-quotechar", "|"]
172+
output = lib.run(cmd, stdin=self.pwd)
173+
self.validate_vertbar(output)
174+
147175
@unittest.skipIf(lib.platform == "Windows",
148176
"Windows DLL isn't backwards compatible")
149177
def test_firefox_nopassword_46_default(self):

‎tests/direct_profile.t‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ class TestDirectProfilePass(unittest.TestCase):
5252
"test_profile_firefox_59")
5353
self.run_firefox_with_password()
5454

55+
def test_firefox_144(self):
56+
self.test = os.path.join(lib.get_test_data(),
57+
"test_profile_firefox_144")
58+
self.run_firefox_with_password()
59+
5560
def test_firefox_non_ascii(self):
5661
self.test = os.path.join(lib.get_test_data(),
5762
"test_profile_firefox_LЮшр/")

‎tests/json.t‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ class TestJSON(unittest.TestCase):
5151
output = lib.run(cmd, stdin=self.pwd, stderr=sys.stderr)
5252
self.validate_default(output)
5353

54+
def test_firefox_144_default(self):
55+
test = os.path.join(self.test, "test_profile_firefox_144")
56+
57+
cmd = lib.get_script() + [test, "--format", "json"]
58+
output = lib.run(cmd, stdin=self.pwd, stderr=sys.stderr)
59+
self.validate_default(output)
60+
5461
@unittest.skipIf(lib.platform == "Windows",
5562
"Windows DLL isn't backwards compatible")
5663
def test_firefox_nopassword_46_default(self):

‎tests/list_single_profile.t‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ class TestSingleProfile(unittest.TestCase):
4242
self.output_data = "list_single_59"
4343
self.listing_from_single_profile()
4444

45+
def test_firefox_144(self):
46+
self.test_profile = "test_profile_firefox_144"
47+
self.output_data = "list_single_144"
48+
self.listing_from_single_profile()
4549

4650
if __name__ == "__main__":
4751
from simpletap import TAPTestRunner

‎tests/non_interactive_choice.t‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ class TestNonInteractiveChoice(unittest.TestCase):
4343
out = lib.run(cmd, stdin=pwd)
4444
self.validate(out)
4545

46+
def test_firefox_144(self):
47+
cmd = lib.get_script() + [lib.get_test_data(), "-nc", "7"]
48+
pwd = lib.get_password()
49+
50+
out = lib.run(cmd, stdin=pwd)
51+
self.validate(out)
52+
4653
@unittest.skipIf(lib.platform == "Windows",
4754
"Windows DLL isn't backwards compatible")
4855
def test_firefox_nopass_46(self):

‎tests/profile_ini.t‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ class TestProfileIni(unittest.TestCase):
5050
output = lib.run(cmd, stdin=payload)
5151
self.validate(output)
5252

53+
def test_firefox_144(self):
54+
cmd = lib.get_script() + [self.test]
55+
choice = "7"
56+
payload = '\n'.join((choice, self.pwd))
57+
58+
output = lib.run(cmd, stdin=payload)
59+
self.validate(output)
60+
5361
def test_firefox_non_ascii(self):
5462
cmd = lib.get_script() + [self.test]
5563
choice = "5"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- WARNING - profile.ini not found in test_data/test_profile_firefox_59
2+
- WARNING - Continuing and assuming 'test_data/test_profile_firefox_59' is a profile location
3+
- ERROR - Listing single profiles not permitted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
- WARNING - profile.ini not found in test_data/test_profile_firefox_59
2-
- WARNING - Continuing and assuming 'test_data/test_profile_firefox_59' is a profile location
1+
- WARNING - profile.ini not found in test_data/test_profile_firefox_144
2+
- WARNING - Continuing and assuming 'test_data/test_profile_firefox_144' is a profile location
33
- ERROR - Listing single profiles not permitted.

0 commit comments

Comments
 (0)