-
Notifications
You must be signed in to change notification settings - Fork 130
Expand file tree
/
Copy pathXCBuildShellScriptTests.m
More file actions
48 lines (34 loc) · 1.37 KB
/
XCBuildShellScriptTests.m
File metadata and controls
48 lines (34 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// XCBuildShellScriptTests.m
// XcodeEditor
//
// Created by Edward Poot on 23-06-16.
// Copyright © 2016 appsquickly. All rights reserved.
//
#import <XCTest/XCTest.h>
#import "XCTestResourceUtils.h"
#import "XCBuildShellScript.h"
#import "XCProject.h"
@interface XCBuildShellScriptTests : XCTestCase
@end
@implementation XCBuildShellScriptTests
{
XCProject *_project;
}
- (void)setUp
{
_project = [[XCProject alloc] initWithFilePath:XCTestResourcePath()];
}
- (void)test_emoji_in_name_is_correctly_removed_in_shell_scirpt
{
NSString *stringWithEmoji = @"📦 Test";
XCBuildShellScript *testBuildShellScriptDefinition =[XCBuildShellScript shellScriptWithProject:_project key:@"" name:stringWithEmoji files:@[] inputPaths:@[] outputPaths:@[] runOnlyForDeploymentPostprocessing:FALSE shellPath:@"" shellScript:@""];
XCTAssertTrue([testBuildShellScriptDefinition.name isEqualToString:@" Test"]);
}
- (void)test_ordinary_name_not_altered_in_shell_script
{
NSString *ordinaryName = @"Test build script";
XCBuildShellScript *testBuildShellScriptDefinition =[XCBuildShellScript shellScriptWithProject:_project key:@"" name:ordinaryName files:@[] inputPaths:@[] outputPaths:@[] runOnlyForDeploymentPostprocessing:FALSE shellPath:@"" shellScript:@""];
XCTAssertTrue([testBuildShellScriptDefinition.name isEqualToString:ordinaryName]);
}
@end