Skip to content

test: Characterize obs-hotkey-name-map.c before port - #834

Merged
zackees merged 1 commit into
masterfrom
test/hotkey-name-map
Oct 15, 2026
Merged

zackees merged 1 commit into
masterfrom
test/hotkey-name-map

Conversation

@zackees

@zackees zackees commented Oct 15, 2026

Copy link
Copy Markdown
Member

Refs #833 (step 1: characterization, no Rust).

New Tier 2 test test/cmocka/test_hotkey_name_map.c (registered via tests.d/test_hotkey_name_map.cmake; no existing test edited):

  • every key in obs-hotkeys.h (built from the same header, checked against OBS_KEY_LAST_VALUE) round-trips code → name → code;
  • unknown names, a trailing space, a lowercase name and "OBS_KEY_LAST_VALUE" give OBS_KEY_NONE;
  • codes at and past OBS_KEY_LAST_VALUE give "" (with the C error log);
  • the same checks without a core (the linear-scan fallback) and after obs_startup (the map, twice).

The after-startup half skips when obs_startup fails (no display), like test_audio_clock_drift. The Tier 2 harness runs ctest under xvfb-run, so it should run there; a cmocka skip still counts as a pass, so I could not confirm from the harness summary that it did.

Local: rust/tools/linux-validate/run.sh --repeat 3 --tests test_hotkey_name_map: 247/247 OFF and ON, 3 repeats each; ./lint ok.

C only, no Rust: test_hotkey_name_map round-trips every key in
obs-hotkeys.h through obs_key_to_name and obs_key_from_name, and pins
unknown and case-mismatched names, OBS_KEY_NONE, and codes at and past
OBS_KEY_LAST_VALUE, both without a core (linear scan) and after
obs_startup (the name map).

Refs #833
@zackees
zackees added this pull request to the merge queue Oct 15, 2026
Merged via the queue into master with commit dd80fde Oct 15, 2026
23 checks passed
@zackees
zackees deleted the test/hotkey-name-map branch October 26, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant