FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node-xcode/test/addToPbxFileReferenceSection.js at master · jaredly/node-xcode · GitHub
jaredly
/
node-xcode
Public
forked from
alunny/node-xcode
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
node-xcode
/
test
/
addToPbxFileReferenceSection.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
62 lines (51 loc) · 3.19 KB
Breadcrumbs
node-xcode
/
test
/
addToPbxFileReferenceSection.js
Copy path
File metadata and controls
62 lines (51 loc) · 3.19 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
var
jsonProject
=
require
(
'./fixtures/full-project'
)
fullProjectStr
=
JSON
.
stringify
(
jsonProject
)
,
pbx
=
require
(
'../lib/pbxProject'
)
,
pbxFile
=
require
(
'../lib/pbxFile'
)
,
myProj
=
new
pbx
(
'.'
)
;
function
cleanHash
(
)
{
return
JSON
.
parse
(
fullProjectStr
)
;
}
exports
.
setUp
=
function
(
callback
)
{
myProj
.
hash
=
cleanHash
(
)
;
callback
(
)
;
}
exports
[
'addToPbxFileReferenceSection function'
]
=
{
'should add file and comment to fileReferenceSection'
:
function
(
test
)
{
var
file
=
new
pbxFile
(
'file.m'
)
;
file
.
fileRef
=
myProj
.
generateUuid
(
)
;
myProj
.
addToPbxFileReferenceSection
(
file
)
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
file
.
fileRef
]
.
isa
,
'PBXFileReference'
)
;
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
file
.
fileRef
]
.
lastKnownFileType
,
'sourcecode.c.objc'
)
;
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
file
.
fileRef
]
.
name
,
'"file.m"'
)
;
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
file
.
fileRef
]
.
path
,
'"file.m"'
)
;
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
file
.
fileRef
]
.
sourceTree
,
'"<group>"'
)
;
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
file
.
fileRef
]
.
fileEncoding
,
4
)
;
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
file
.
fileRef
+
"_comment"
]
,
'file.m'
)
;
test
.
done
(
)
;
}
,
'should add file with preset explicitFileType to fileReferenceSection correctly'
:
function
(
test
)
{
var
appexFile
=
{
fileRef
:
myProj
.
generateUuid
(
)
,
isa
:
'PBXFileReference'
,
explicitFileType
:
'"wrapper.app-extension"'
,
path
:
"WatchKit Extension.appex"
}
;
myProj
.
addToPbxFileReferenceSection
(
appexFile
)
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
appexFile
.
fileRef
]
.
isa
,
'PBXFileReference'
)
;
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
appexFile
.
fileRef
]
.
explicitFileType
,
'"wrapper.app-extension"'
)
;
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
appexFile
.
fileRef
]
.
path
,
'"WatchKit Extension.appex"'
)
;
test
.
done
(
)
;
}
,
'should add file with preset includeInIndex to fileReferenceSection correctly'
:
function
(
test
)
{
var
appexFile
=
{
fileRef
:
myProj
.
generateUuid
(
)
,
isa
:
'PBXFileReference'
,
includeInIndex
:
0
,
path
:
"WatchKit Extension.appex"
}
;
myProj
.
addToPbxFileReferenceSection
(
appexFile
)
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
appexFile
.
fileRef
]
.
isa
,
'PBXFileReference'
)
;
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
appexFile
.
fileRef
]
.
includeInIndex
,
0
)
;
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
appexFile
.
fileRef
]
.
path
,
'"WatchKit Extension.appex"'
)
;
test
.
done
(
)
;
}
,
'should add file with preset sourceTree to fileReferenceSection correctly'
:
function
(
test
)
{
var
appexFile
=
{
fileRef
:
myProj
.
generateUuid
(
)
,
isa
:
'PBXFileReference'
,
sourceTree
:
'BUILT_PRODUCTS_DIR'
,
path
:
"WatchKit Extension.appex"
}
;
myProj
.
addToPbxFileReferenceSection
(
appexFile
)
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
appexFile
.
fileRef
]
.
isa
,
'PBXFileReference'
)
;
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
appexFile
.
fileRef
]
.
sourceTree
,
'BUILT_PRODUCTS_DIR'
)
;
test
.
equal
(
myProj
.
pbxFileReferenceSection
(
)
[
appexFile
.
fileRef
]
.
path
,
'"WatchKit Extension.appex"'
)
;
test
.
done
(
)
;
}
}
Back
|
FazBrowse Home
|
New Git URL