-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Due to an error in the regex parsing the webpage content, all headers using `_` were missing.
- Loading branch information
Showing
7 changed files
with
80 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
load("@rules_python//python:defs.bzl", "py_binary") | ||
|
||
py_binary( | ||
name = "extract_std_headers", | ||
srcs = ["extract_std_headers.py"], | ||
visibility = [":__subpackages__"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
load("@rules_python//python:defs.bzl", "py_test") | ||
|
||
py_test( | ||
name = "extract_std_headers_test", | ||
srcs = ["extract_std_headers_test.py"], | ||
deps = ["//scripts:extract_std_headers"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from __future__ import annotations | ||
|
||
import unittest | ||
|
||
from scripts.extract_std_headers import extract_header | ||
|
||
|
||
class TestExtractHeader(unittest.TestCase): | ||
def test_empty_input_yields_empty_list(self) -> None: | ||
self.assertEqual(extract_header(""), []) | ||
|
||
def test_extracting_headers(self) -> None: | ||
headers = extract_header( | ||
""" | ||
unrelated_stuff | ||
<foo> | ||
ignore this | ||
<bar.h> | ||
<multiple_header><in_one_line> | ||
""".strip() | ||
) | ||
|
||
self.assertEqual(headers, ["foo", "bar.h", "multiple_header", "in_one_line"]) | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters