Update manuals and other additions
This commit is contained in:
@@ -6,11 +6,11 @@ from src.parser import parse_protel
|
||||
from src.preprocess import normalize_keywords, strip_shebang
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
HELLO = ROOT / "examples" / "Hello.protel"
|
||||
HELLO = ROOT / "examples" / "Hello.P"
|
||||
|
||||
|
||||
def test_strip_shebang_removes_first_line():
|
||||
source = "#!/usr/bin/env -S protel --run --\nSECTION s;\n"
|
||||
source = "#!/usr/bin/env -S Pc --run --\nSECTION s;\n"
|
||||
assert strip_shebang(source) == "SECTION s;\n"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ def test_strip_shebang_passthrough_without_hash_bang():
|
||||
|
||||
|
||||
def test_normalize_keywords_strips_shebang_before_parse():
|
||||
source = "#!/usr/bin/env protel --run\n% hi\nSECTION s;\n"
|
||||
source = "#!/usr/bin/env Pc --run\n% hi\nSECTION s;\n"
|
||||
norm = normalize_keywords(source)
|
||||
assert "#!" not in norm
|
||||
assert "SECTION" in norm
|
||||
|
||||
Reference in New Issue
Block a user