From dcd21df61931e7cdf8354e776392acdb88a9aee4 Mon Sep 17 00:00:00 2001 From: Victor Ilyukevich Date: Tue, 30 Aug 2016 15:42:51 +0300 Subject: [PATCH] Add integration tests for number of localizations This proves the issue described in #219. --- IntegrationTests/Carthage-OSX/ExampleTests/ExampleTests.swift | 4 ++++ IntegrationTests/Carthage-iOS/ExampleTests/ExampleTests.swift | 4 ++++ .../Carthage-tvOS/ExampleTests/ExampleTests.swift | 4 ++++ .../CocoaPods-OSX/ExampleTests/ExampleTests.swift | 4 ++++ .../CocoaPods-iOS-static/ExampleTests/ExampleTests.m | 4 ++++ .../CocoaPods-iOS/ExampleTests/ExampleTests.swift | 4 ++++ .../CocoaPods-tvOS/ExampleTests/ExampleTests.swift | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/IntegrationTests/Carthage-OSX/ExampleTests/ExampleTests.swift b/IntegrationTests/Carthage-OSX/ExampleTests/ExampleTests.swift index 2aead73..088ff62 100644 --- a/IntegrationTests/Carthage-OSX/ExampleTests/ExampleTests.swift +++ b/IntegrationTests/Carthage-OSX/ExampleTests/ExampleTests.swift @@ -14,4 +14,8 @@ class ExampleTests: XCTestCase { let a = AppDelegate() XCTAssertEqual(a.foo(), "il y a 1 heure") } + + func testNumberOfLocalizations() { + XCTAssertEqual(NSBundle.mainBundle().localizations.count, 3) // Base, fr, en + } } diff --git a/IntegrationTests/Carthage-iOS/ExampleTests/ExampleTests.swift b/IntegrationTests/Carthage-iOS/ExampleTests/ExampleTests.swift index f505387..8e2438e 100644 --- a/IntegrationTests/Carthage-iOS/ExampleTests/ExampleTests.swift +++ b/IntegrationTests/Carthage-iOS/ExampleTests/ExampleTests.swift @@ -14,4 +14,8 @@ class ExampleTests: XCTestCase { let a = AppDelegate() XCTAssertEqual(a.foo(), "hace 3 semanas") } + + func testNumberOfLocalizations() { + XCTAssertEqual(NSBundle.mainBundle().localizations.count, 2) + } } diff --git a/IntegrationTests/Carthage-tvOS/ExampleTests/ExampleTests.swift b/IntegrationTests/Carthage-tvOS/ExampleTests/ExampleTests.swift index f505387..8e2438e 100644 --- a/IntegrationTests/Carthage-tvOS/ExampleTests/ExampleTests.swift +++ b/IntegrationTests/Carthage-tvOS/ExampleTests/ExampleTests.swift @@ -14,4 +14,8 @@ class ExampleTests: XCTestCase { let a = AppDelegate() XCTAssertEqual(a.foo(), "hace 3 semanas") } + + func testNumberOfLocalizations() { + XCTAssertEqual(NSBundle.mainBundle().localizations.count, 2) + } } diff --git a/IntegrationTests/CocoaPods-OSX/ExampleTests/ExampleTests.swift b/IntegrationTests/CocoaPods-OSX/ExampleTests/ExampleTests.swift index 2aead73..6aee2eb 100644 --- a/IntegrationTests/CocoaPods-OSX/ExampleTests/ExampleTests.swift +++ b/IntegrationTests/CocoaPods-OSX/ExampleTests/ExampleTests.swift @@ -14,4 +14,8 @@ class ExampleTests: XCTestCase { let a = AppDelegate() XCTAssertEqual(a.foo(), "il y a 1 heure") } + + func testNumberOfLocalizations() { + XCTAssertEqual(NSBundle.mainBundle().localizations.count, 3) // Base, en, es + } } diff --git a/IntegrationTests/CocoaPods-iOS-static/ExampleTests/ExampleTests.m b/IntegrationTests/CocoaPods-iOS-static/ExampleTests/ExampleTests.m index 662d6f5..f3724a7 100644 --- a/IntegrationTests/CocoaPods-iOS-static/ExampleTests/ExampleTests.m +++ b/IntegrationTests/CocoaPods-iOS-static/ExampleTests/ExampleTests.m @@ -20,4 +20,8 @@ - (void)testFoo { XCTAssertEqualObjects(a.foo, @"vor 1 Stunde"); } +- (void)testNumberOfLocalizations { + XCTAssertEqual([NSBundle mainBundle].localizations.count, 2); +} + @end diff --git a/IntegrationTests/CocoaPods-iOS/ExampleTests/ExampleTests.swift b/IntegrationTests/CocoaPods-iOS/ExampleTests/ExampleTests.swift index f505387..8e2438e 100644 --- a/IntegrationTests/CocoaPods-iOS/ExampleTests/ExampleTests.swift +++ b/IntegrationTests/CocoaPods-iOS/ExampleTests/ExampleTests.swift @@ -14,4 +14,8 @@ class ExampleTests: XCTestCase { let a = AppDelegate() XCTAssertEqual(a.foo(), "hace 3 semanas") } + + func testNumberOfLocalizations() { + XCTAssertEqual(NSBundle.mainBundle().localizations.count, 2) + } } diff --git a/IntegrationTests/CocoaPods-tvOS/ExampleTests/ExampleTests.swift b/IntegrationTests/CocoaPods-tvOS/ExampleTests/ExampleTests.swift index f505387..8e2438e 100644 --- a/IntegrationTests/CocoaPods-tvOS/ExampleTests/ExampleTests.swift +++ b/IntegrationTests/CocoaPods-tvOS/ExampleTests/ExampleTests.swift @@ -14,4 +14,8 @@ class ExampleTests: XCTestCase { let a = AppDelegate() XCTAssertEqual(a.foo(), "hace 3 semanas") } + + func testNumberOfLocalizations() { + XCTAssertEqual(NSBundle.mainBundle().localizations.count, 2) + } }