@@ -46,7 +46,7 @@ describe("Android project properties parser tests", () => {
46
46
let projectPropertiesManager = testInjector . resolve ( ProjectPropertiesManagerLib . AndroidProjectPropertiesManager , { directoryPath : tempFolder } ) ;
47
47
projectPropertiesManager . addProjectReference ( "testValue" ) . wait ( ) ;
48
48
49
- let expectedContent = 'target=android-21' + os . EOL +
49
+ let expectedContent = 'target=android-21' + '\n' +
50
50
'android.library.reference.1=testValue' ;
51
51
let actualContent = fs . readText ( path . join ( tempFolder , "project.properties" ) ) . wait ( ) ;
52
52
@@ -57,17 +57,17 @@ describe("Android project properties parser tests", () => {
57
57
let testInjector = createTestInjector ( ) ;
58
58
let fs = testInjector . resolve ( "fs" ) ;
59
59
60
- let projectPropertiesFileContent = 'target=android-21' + os . EOL +
60
+ let projectPropertiesFileContent = 'target=android-21' + '\n' +
61
61
'android.library.reference.1=someValue' ;
62
62
let tempFolder = temp . mkdirSync ( "AndroidProjectPropertiesManager" ) ;
63
63
fs . writeFile ( path . join ( tempFolder , "project.properties" ) , projectPropertiesFileContent ) . wait ( ) ;
64
64
65
65
let projectPropertiesManager = testInjector . resolve ( ProjectPropertiesManagerLib . AndroidProjectPropertiesManager , { directoryPath : tempFolder } ) ;
66
66
projectPropertiesManager . addProjectReference ( "testValue" ) . wait ( ) ;
67
67
68
- let expectedContent = 'target=android-21' + os . EOL +
69
- 'android.library.reference.1=someValue' + os . EOL +
70
- 'android.library.reference.2=testValue' ;
68
+ let expectedContent = [ 'target=android-21' ,
69
+ 'android.library.reference.1=someValue' ,
70
+ 'android.library.reference.2=testValue' ] . join ( '\n' ) ;
71
71
let actualContent = fs . readText ( path . join ( tempFolder , "project.properties" ) ) . wait ( ) ;
72
72
73
73
assert . equal ( expectedContent , actualContent ) ;
@@ -77,19 +77,19 @@ describe("Android project properties parser tests", () => {
77
77
let testInjector = createTestInjector ( ) ;
78
78
let fs = testInjector . resolve ( "fs" ) ;
79
79
80
- let projectPropertiesFileContent = 'target=android-21' + os . EOL +
81
- 'android.library.reference.1=value1' + os . EOL +
82
- 'android.library.reference.2=value2' + os . EOL +
83
- 'android.library.reference.3=value3' + os . EOL +
84
- 'android.library.reference.4=value4' + os . EOL +
85
- 'android.library.reference.5=value5' ;
80
+ let projectPropertiesFileContent = [ 'target=android-21' ,
81
+ 'android.library.reference.1=value1' ,
82
+ 'android.library.reference.2=value2' ,
83
+ 'android.library.reference.3=value3' ,
84
+ 'android.library.reference.4=value4' ,
85
+ 'android.library.reference.5=value5' ] . join ( '\n' ) ;
86
86
let tempFolder = temp . mkdirSync ( "AndroidProjectPropertiesManager" ) ;
87
87
fs . writeFile ( path . join ( tempFolder , "project.properties" ) , projectPropertiesFileContent ) . wait ( ) ;
88
88
89
89
let projectPropertiesManager : IAndroidProjectPropertiesManager = testInjector . resolve ( ProjectPropertiesManagerLib . AndroidProjectPropertiesManager , { directoryPath : tempFolder } ) ;
90
90
projectPropertiesManager . addProjectReference ( "testValue" ) . wait ( ) ;
91
91
92
- let expectedContent = projectPropertiesFileContent + os . EOL +
92
+ let expectedContent = projectPropertiesFileContent + '\n' +
93
93
'android.library.reference.6=testValue' ;
94
94
95
95
let actualContent = fs . readText ( path . join ( tempFolder , "project.properties" ) ) . wait ( ) ;
@@ -101,7 +101,7 @@ describe("Android project properties parser tests", () => {
101
101
let testInjector = createTestInjector ( ) ;
102
102
let fs = testInjector . resolve ( "fs" ) ;
103
103
104
- let projectPropertiesFileContent = 'android.library.reference.1=value1' + os . EOL +
104
+ let projectPropertiesFileContent = 'android.library.reference.1=value1' + '\n' +
105
105
'target=android-21' ;
106
106
let tempFolder = temp . mkdirSync ( "AndroidProjectPropertiesManager" ) ;
107
107
fs . writeFile ( path . join ( tempFolder , "project.properties" ) , projectPropertiesFileContent ) . wait ( ) ;
@@ -119,23 +119,23 @@ describe("Android project properties parser tests", () => {
119
119
let testInjector = createTestInjector ( ) ;
120
120
let fs = testInjector . resolve ( "fs" ) ;
121
121
122
- let projectPropertiesFileContent = 'target=android-17' + os . EOL +
123
- 'android.library.reference.1=value1' + os . EOL +
124
- 'android.library.reference.2=value2' + os . EOL +
125
- 'android.library.reference.3=value3' + os . EOL +
126
- 'android.library.reference.4=value4' + os . EOL +
127
- 'android.library.reference.5=value5' ;
122
+ let projectPropertiesFileContent = [ 'target=android-17' ,
123
+ 'android.library.reference.1=value1' ,
124
+ 'android.library.reference.2=value2' ,
125
+ 'android.library.reference.3=value3' ,
126
+ 'android.library.reference.4=value4' ,
127
+ 'android.library.reference.5=value5' ] . join ( '\n' ) ;
128
128
let tempFolder = temp . mkdirSync ( "AndroidProjectPropertiesManager" ) ;
129
129
fs . writeFile ( path . join ( tempFolder , "project.properties" ) , projectPropertiesFileContent ) . wait ( ) ;
130
130
131
131
let projectPropertiesManager : IAndroidProjectPropertiesManager = testInjector . resolve ( ProjectPropertiesManagerLib . AndroidProjectPropertiesManager , { directoryPath : tempFolder } ) ;
132
132
projectPropertiesManager . removeProjectReference ( "value3" ) . wait ( ) ;
133
133
134
- let expectedContent = 'target=android-17' + os . EOL +
135
- 'android.library.reference.1=value1' + os . EOL +
136
- 'android.library.reference.2=value2' + os . EOL +
137
- 'android.library.reference.3=value4' + os . EOL +
138
- 'android.library.reference.4=value5' + os . EOL ;
134
+ let expectedContent = [ 'target=android-17' ,
135
+ 'android.library.reference.1=value1' ,
136
+ 'android.library.reference.2=value2' ,
137
+ 'android.library.reference.3=value4' ,
138
+ 'android.library.reference.4=value5' ] . join ( '\n' ) + '\n' ;
139
139
let actualContent = fs . readText ( path . join ( tempFolder , "project.properties" ) ) . wait ( ) ;
140
140
141
141
assert . equal ( expectedContent , actualContent ) ;
0 commit comments