|
1 | 1 | var pbxFile = require('../lib/pbxFile'); |
2 | 2 |
|
3 | | -exports['lastType'] = { |
| 3 | +exports['lastKnownFileType'] = { |
4 | 4 | 'should detect that a .m path means sourcecode.c.objc': function (test) { |
5 | 5 | var sourceFile = new pbxFile('Plugins/ChildBrowser.m'); |
6 | 6 |
|
7 | | - test.equal('sourcecode.c.objc', sourceFile.lastType); |
| 7 | + test.equal('sourcecode.c.objc', sourceFile.lastKnownFileType); |
8 | 8 | test.done(); |
9 | 9 | }, |
10 | 10 |
|
11 | 11 | 'should detect that a .h path means sourceFile.c.h': function (test) { |
12 | 12 | var sourceFile = new pbxFile('Plugins/ChildBrowser.h'); |
13 | 13 |
|
14 | | - test.equal('sourcecode.c.h', sourceFile.lastType); |
| 14 | + test.equal('sourcecode.c.h', sourceFile.lastKnownFileType); |
15 | 15 | test.done(); |
16 | 16 | }, |
17 | 17 |
|
18 | 18 | 'should detect that a .bundle path means "wrapper.plug-in"': function (test) { |
19 | 19 | var sourceFile = new pbxFile('Plugins/ChildBrowser.bundle'); |
20 | 20 |
|
21 | | - test.equal('"wrapper.plug-in"', sourceFile.lastType); |
| 21 | + test.equal('wrapper.plug-in', sourceFile.lastKnownFileType); |
22 | 22 | test.done(); |
23 | 23 | }, |
24 | 24 |
|
25 | 25 | 'should detect that a .xib path means file.xib': function (test) { |
26 | 26 | var sourceFile = new pbxFile('Plugins/ChildBrowser.xib'); |
27 | 27 |
|
28 | | - test.equal('file.xib', sourceFile.lastType); |
| 28 | + test.equal('file.xib', sourceFile.lastKnownFileType); |
29 | 29 | test.done(); |
30 | 30 | }, |
31 | 31 |
|
32 | 32 | 'should detect that a .dylib path means "compiled.mach-o.dylib"': function (test) { |
33 | 33 | var sourceFile = new pbxFile('libsqlite3.dylib'); |
34 | 34 |
|
35 | | - test.equal('"compiled.mach-o.dylib"', sourceFile.lastType); |
| 35 | + test.equal('compiled.mach-o.dylib', sourceFile.lastKnownFileType); |
36 | 36 | test.done(); |
37 | 37 | }, |
38 | 38 |
|
39 | 39 | 'should detect that a .framework path means wrapper.framework': function (test) { |
40 | 40 | var sourceFile = new pbxFile('MessageUI.framework'); |
41 | 41 |
|
42 | | - test.equal('wrapper.framework', sourceFile.lastType); |
| 42 | + test.equal('wrapper.framework', sourceFile.lastKnownFileType); |
43 | 43 | test.done(); |
44 | 44 | }, |
45 | 45 |
|
46 | 46 | 'should detect that a .a path means archive.ar': function (test) { |
47 | 47 | var sourceFile = new pbxFile('libGoogleAnalytics.a'); |
48 | 48 |
|
49 | | - test.equal('archive.ar', sourceFile.lastType); |
| 49 | + test.equal('archive.ar', sourceFile.lastKnownFileType); |
50 | 50 | test.done(); |
51 | 51 | }, |
52 | 52 |
|
53 | | - 'should allow lastType to be overridden': function (test) { |
| 53 | + 'should allow lastKnownFileType to be overridden': function (test) { |
54 | 54 | var sourceFile = new pbxFile('Plugins/ChildBrowser.m', |
55 | | - { lastType: 'somestupidtype' }); |
| 55 | + { lastKnownFileType: 'somestupidtype' }); |
56 | 56 |
|
57 | | - test.equal('somestupidtype', sourceFile.lastType); |
| 57 | + test.equal('somestupidtype', sourceFile.lastKnownFileType); |
58 | 58 | test.done(); |
59 | 59 | }, |
60 | 60 |
|
61 | | - 'should set lastType to unknown if undetectable': function (test) { |
| 61 | + 'should set lastKnownFileType to unknown if undetectable': function (test) { |
62 | 62 | var sourceFile = new pbxFile('Plugins/ChildBrowser.guh'); |
63 | 63 |
|
64 | | - test.equal('unknown', sourceFile.lastType); |
| 64 | + test.equal('unknown', sourceFile.lastKnownFileType); |
65 | 65 | test.done(); |
66 | 66 | } |
67 | 67 | } |
|
0 commit comments