Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Javagedes committed Nov 18, 2023
1 parent 60fd0da commit f199ec3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests.unit/parsers/test_hash_file_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ def test_strip_comment(self):
parser = HashFileParser("")

lines_to_test = [
("Test \t# this shouldn't show up", "Test"),
("Test # test", "Test"),
("MagicLib|Include/Magic \t# this shouldn't show up", "MagicLib|Include/Magic"),
("MagicLib|Include/Magic # test", "MagicLib|Include/Magic"),
("# this is a comment", ""),
("gMyPkgTokenSpaceGuid.MyThing|'Value'|VOID*|0x10000000 # My Comment", "gMyPkgTokenSpaceGuid.MyThing|'Value'|VOID*|0x10000000"),
('gMyPkgTokenSpaceGuid.MyThing|"Value"|VOID*|0x10000000 # My Comment', 'gMyPkgTokenSpaceGuid.MyThing|"Value"|VOID*|0x10000000'),
('gMyPkgTokenSpaceGuid.MyThing|"#Value"|VOID*|0x10000000 # My Comment', 'gMyPkgTokenSpaceGuid.MyThing|"#Value"|VOID*|0x10000000'),
("Test", "\t# this shouldn't show up"),
("Test", " # test"),
("MagicLib|Include/Magic", "\t# this shouldn't show up"),
("MagicLib|Include/Magic", "# test"),
("", "# this is a comment"),
("gMyPkgTokenSpaceGuid.MyThing|'Value'|VOID*|0x10000000", " # My Comment"),
('gMyPkgTokenSpaceGuid.MyThing|"Value"|VOID*|0x10000000', "# My Comment"),
('gMyPkgTokenSpaceGuid.MyThing|"#Value"|VOID*|0x10000000', "# My Comment"),
]

for line in lines_to_test:
self.assertEqual(parser.StripComment(line[0]), line[1])
self.assertEqual(parser.StripComment(line[0]+line[1]), line[0])

0 comments on commit f199ec3

Please sign in to comment.