@@ -27,12 +27,13 @@ public void i18nJs() throws Exception {
2727 plugin .setSuffix (".html" );
2828 plugin .setOutput ("target/helpers-i18njs.js" );
2929 plugin .setProject (newProject ());
30- plugin .setHandlebarsJsFile ("/handlebars-v4.0.4 .js" );
30+ plugin .setHandlebarsJsFile ("/handlebars-v4.7.3 .js" );
3131
3232 plugin .execute ();
3333
34- assertEquals (FileUtils .fileRead ("src/test/resources/helpers-i18njs.expected" ),
35- FileUtils .fileRead ("target/helpers-i18njs.js" ));
34+ assertEquals (FileUtils .fileRead ("target/helpers-i18njs.js" ),
35+ FileUtils .fileRead ("src/test/resources/helpers-i18njs.expected" ).trim (),
36+ FileUtils .fileRead ("target/helpers-i18njs.js" ).trim ());
3637 }
3738
3839 @ Test
@@ -44,12 +45,13 @@ public void chooseSpecificFiles() throws Exception {
4445 plugin .addTemplate ("a" );
4546 plugin .addTemplate ("c" );
4647 plugin .setProject (newProject ());
47- plugin .setHandlebarsJsFile ("/handlebars-v4.0.4 .js" );
48+ plugin .setHandlebarsJsFile ("/handlebars-v4.7.3 .js" );
4849
4950 plugin .execute ();
5051
51- assertEquals (FileUtils .fileRead ("src/test/resources/specific-files.expected" ),
52- FileUtils .fileRead ("target/specific-files.js" ));
52+ assertEquals (FileUtils .fileRead ("target/specific-files.js" ),
53+ FileUtils .fileRead ("src/test/resources/specific-files.expected" ).trim (),
54+ FileUtils .fileRead ("target/specific-files.js" ).trim ());
5355 }
5456
5557 @ Test
@@ -59,7 +61,7 @@ public void outputDirMustBeCreated() throws Exception {
5961 plugin .setSuffix (".html" );
6062 plugin .setOutput ("target/newdir/helpers.js" );
6163 plugin .setProject (newProject ());
62- plugin .setHandlebarsJsFile ("/handlebars-v4.0.4 .js" );
64+ plugin .setHandlebarsJsFile ("/handlebars-v4.7.3 .js" );
6365
6466 plugin .execute ();
6567 }
@@ -71,7 +73,7 @@ public void missingHelperMustBeSilent() throws Exception {
7173 plugin .setSuffix (".html" );
7274 plugin .setOutput ("target/missing-helpers.js" );
7375 plugin .setProject (newProject ());
74- plugin .setHandlebarsJsFile ("/handlebars-v4.0.4 .js" );
76+ plugin .setHandlebarsJsFile ("/handlebars-v4.7.3 .js" );
7577
7678 plugin .execute ();
7779 }
@@ -83,7 +85,7 @@ public void noFileMustBeCreatedIfNoTemplatesWereFound() throws Exception {
8385 plugin .setSuffix (".html" );
8486 plugin .setOutput ("target/no-helpers.js" );
8587 plugin .setProject (newProject ());
86- plugin .setHandlebarsJsFile ("/handlebars-v4.0.4 .js" );
88+ plugin .setHandlebarsJsFile ("/handlebars-v4.7.3 .js" );
8789
8890 plugin .execute ();
8991
@@ -125,7 +127,7 @@ public void mustFailOnUnExpectedException() throws Exception {
125127 plugin .setSuffix (".html" );
126128 plugin .setOutput ("target/no-helpers.js" );
127129 plugin .setProject (project );
128- plugin .setHandlebarsJsFile ("/handlebars-v4.0.4 .js" );
130+ plugin .setHandlebarsJsFile ("/handlebars-v4.7.3 .js" );
129131
130132 plugin .execute ();
131133 }
@@ -137,7 +139,7 @@ public void fileWithRuntimeMustBeLargerThanNormalFiles() throws Exception {
137139 withoutRT .setSuffix (".html" );
138140 withoutRT .setOutput ("target/without-rt-helpers.js" );
139141 withoutRT .setProject (newProject ());
140- withoutRT .setHandlebarsJsFile ("/handlebars-v4.0.4 .js" );
142+ withoutRT .setHandlebarsJsFile ("/handlebars-v4.7.3 .js" );
141143
142144 withoutRT .execute ();
143145
@@ -147,7 +149,7 @@ public void fileWithRuntimeMustBeLargerThanNormalFiles() throws Exception {
147149 withRT .setOutput ("target/with-rt-helpers.js" );
148150 withRT .setRuntime ("src/test/resources/handlebars.runtime.js" );
149151 withRT .setProject (newProject ());
150- withRT .setHandlebarsJsFile ("/handlebars-v4.0.4 .js" );
152+ withRT .setHandlebarsJsFile ("/handlebars-v4.7.3 .js" );
151153
152154 withRT .execute ();
153155
@@ -163,7 +165,7 @@ public void normalFileShouleBeLargerThanMinimizedFiles() throws Exception {
163165 withoutRT .setSuffix (".html" );
164166 withoutRT .setOutput ("target/helpers-normal.js" );
165167 withoutRT .setProject (newProject ());
166- withoutRT .setHandlebarsJsFile ("/handlebars-v4.0.4 .js" );
168+ withoutRT .setHandlebarsJsFile ("/handlebars-v4.7.3 .js" );
167169
168170 withoutRT .execute ();
169171
@@ -173,7 +175,7 @@ public void normalFileShouleBeLargerThanMinimizedFiles() throws Exception {
173175 withRT .setOutput ("target/helpers.min.js" );
174176 withRT .setMinimize (true );
175177 withRT .setProject (newProject ());
176- withRT .setHandlebarsJsFile ("/handlebars-v4.0.4 .js" );
178+ withRT .setHandlebarsJsFile ("/handlebars-v4.7.3 .js" );
177179 withRT .execute ();
178180
179181 assertTrue ("Normal file must be larger than minimized" ,
@@ -188,12 +190,13 @@ public void partials() throws Exception {
188190 plugin .setSuffix (".html" );
189191 plugin .setOutput ("target/helpers.js" );
190192 plugin .setProject (newProject ());
191- plugin .setHandlebarsJsFile ("/handlebars-v4.0.4 .js" );
193+ plugin .setHandlebarsJsFile ("/handlebars-v4.7.3 .js" );
192194
193195 plugin .execute ();
194196
195- assertEquals (FileUtils .fileRead ("src/test/resources/helpers.expected" ),
196- FileUtils .fileRead ("target/helpers.js" ));
197+ assertEquals (FileUtils .fileRead ("target/helpers.js" ),
198+ FileUtils .fileRead ("src/test/resources/helpers.expected" ).trim (),
199+ FileUtils .fileRead ("target/helpers.js" ).trim ());
197200 }
198201
199202 private MavenProject newProject (final String ... classpath )
0 commit comments