Skip to content

Commit b02d48b

Browse files
committed
fix(test_pvl.py): Added test to simulate termination of PVL-text with an ASCII NULL character.
1 parent 7614c01 commit b02d48b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_pvl.py

+4
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,10 @@ def test_utf():
842842
label = pvl.load(utf_file)
843843
assert label["LABEL_REVISION_NOTE"] == "V1.0"
844844

845+
nulllabel = pvl.loads("foo=bar END\0wont=parse")
846+
assert nulllabel["foo"] == "bar"
847+
assert len(nulllabel) == 1
848+
845849

846850
def test_latin1():
847851
latin_file = os.path.join(BROKEN_DIR, "latin-1-degreesymb.pvl")

0 commit comments

Comments
 (0)