From a9e6e5241c0afe3ef5670e5818920eb9a2ba2db7 Mon Sep 17 00:00:00 2001 From: Tomáš Znamenáček Date: Wed, 4 Mar 2015 16:28:25 +0100 Subject: Added a test case for a binder problem with dot symbols (#64). --- Framework/MASShortcutBinderTests.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Framework/MASShortcutBinderTests.m b/Framework/MASShortcutBinderTests.m index 9f90a94..cb04532 100644 --- a/Framework/MASShortcutBinderTests.m +++ b/Framework/MASShortcutBinderTests.m @@ -95,4 +95,11 @@ static NSString *const SampleDefaultsKey = @"sampleShortcut"; @"Bind shortcut using a default value."); } +- (void) testBindingsWithDotSymbol +{ + static NSString *const SampleDefaultsKeyWithDotSymbol = @"sample.Shortcut"; + XCTAssertThrows([_binder bindShortcutWithDefaultsKey:SampleDefaultsKeyWithDotSymbol toAction:^{}], + @"Attempting to use a defaults key with a dot symbol crashes with an exception."); +} + @end -- cgit v1.2.3