Skip to content

Commit 33be2b6

Browse files
authored
Merge pull request #582 from tannewt/fix_2779
Additional validation.
2 parents 68ac4d3 + 4c000de commit 33be2b6

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/validate_pids.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,26 @@
1515

1616
ok = True
1717

18+
for index in vid_1209.glob("*/*"):
19+
if index.name != "index.md":
20+
ok = False
21+
print("Invalid file:", index)
22+
23+
24+
for index in Path("org").glob("*/*"):
25+
if index.name != "index.md":
26+
ok = False
27+
print("Invalid file:", index)
28+
1829
for pid in vid_1209.iterdir():
1930
pid = pid.name
2031
if pid == "index.md":
2132
continue
33+
try:
34+
int(pid, 16)
35+
except ValueError:
36+
ok = False
37+
print("PID " + pid + " not valid hex. Must be 4 characters 0-9 or A-F.")
2238
if pid.upper() != pid:
2339
ok = False
2440
print("PID must be upper case:", pid)

0 commit comments

Comments
 (0)