Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix tests
* Add `ThreadShims.h` to exclude list.
* Fix `check-namespace` to work correctly on Windows.
  • Loading branch information
DomClark committed Dec 28, 2022
commit 07285beb44f93f36e64d6cf9dc390c5e77e3e41d
6 changes: 4 additions & 2 deletions tests/scripted/check-namespace
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ exclude_files = re.compile(
'plugins/MidiExport/MidiFile.hpp|'
'plugins/ReverbSC/[a-z]|'
'plugins/Sf2Player/fluidsynthshims.h|'
'/portsmf/'
'/portsmf/|'
# only forward to headers that are not ours:
'plugins/ZynAddSubFx/ThreadShims.h'
)

files = [Path(f) for f in result.stdout.splitlines() if not exclude_files.search(f)]
Expand Down Expand Up @@ -131,7 +133,7 @@ for cur_file in files:
if cur_file.is_file():
cur_text = cur_file.read_text(errors='replace')

if str(cur_file) not in known_no_namespace_lmms:
if cur_file.as_posix() not in known_no_namespace_lmms:
namespace_pattern.search(cur_text) or error(cur_file, None, f'File has no namespace lmms')

header_guard = str(cur_file).endswith('.h')
Expand Down