feat: Add FPS toggle shortcut and corresponding input handling in CLI

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-23 17:12:27 +01:00
parent b88475882b
commit ea6825341e
3 changed files with 38 additions and 0 deletions
@@ -0,0 +1,21 @@
import 'package:test/test.dart';
import 'package:wolf_3d_dart/wolf_3d_input.dart';
void main() {
group('CliInput shortcuts', () {
test('matches default FPS toggle shortcut with backtick', () {
final input = CliInput();
expect(input.matchesFpsToggleShortcut(const [96]), isTrue);
expect(input.matchesFpsToggleShortcut(const [126]), isFalse);
expect(input.matchesFpsToggleShortcut(const [114]), isFalse);
});
test('matches renderer shortcut case-insensitively', () {
final input = CliInput();
expect(input.matchesRendererToggleShortcut(const [114]), isTrue);
expect(input.matchesRendererToggleShortcut(const [82]), isTrue);
});
});
}