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:
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user