@@ -67,7 +67,7 @@ void getFileWithViewRaw() {
6767 .viewRaw (true )
6868 .get ().join ();
6969 // The raw content should be equal to the original JSON text.
70- assertThat (entry .rawContent ()).isEqualTo (jsonText );
70+ assertThat (entry .rawContent ()).isEqualTo (jsonText + '\n' );
7171 assertThat (entry .content ()).isNotNull ();
7272 assertThatJson (entry .content ()).isEqualTo ("{\" b\" : 2,\" a\" : 1}" );
7373
@@ -101,12 +101,12 @@ void getFilesWithViewRaw() {
101101
102102 assertThat (entriesWithRaw ).hasSize (2 );
103103 final Entry <?> entry1WithRaw = entriesWithRaw .get ("/file1.json" );
104- assertThat (entry1WithRaw .rawContent ()).isEqualTo (jsonText1 );
104+ assertThat (entry1WithRaw .rawContent ()).isEqualTo (jsonText1 + '\n' );
105105 assertThat (entry1WithRaw .content ()).isNotNull ();
106106 assertThatJson (entry1WithRaw .content ()).isEqualTo ("{\" key1\" :\" value1\" ,\" key2\" :\" value2\" }" );
107107
108108 final Entry <?> entry2WithRaw = entriesWithRaw .get ("/file2.json" );
109- assertThat (entry2WithRaw .rawContent ()).isEqualTo (jsonText2 );
109+ assertThat (entry2WithRaw .rawContent ()).isEqualTo (jsonText2 + '\n' );
110110 assertThat (entry2WithRaw .content ()).isNotNull ();
111111 assertThatJson (entry2WithRaw .content ()).isEqualTo ("{\" foo\" :\" bar\" }" );
112112
@@ -146,7 +146,7 @@ void watchWithViewRaw() {
146146 .start (initialResult .revision ())
147147 .join ();
148148
149- assertThat (entryWithRaw .rawContent ()).isEqualTo (updatedJsonText );
149+ assertThat (entryWithRaw .rawContent ()).isEqualTo (updatedJsonText + '\n' );
150150 assertThat (entryWithRaw .content ()).isNotNull ();
151151 assertThatJson (entryWithRaw .content ()).isEqualTo ("{\" version\" :2}" );
152152
@@ -237,14 +237,14 @@ void otherQueryTypesCanBeUsedWithViewRawForFile() {
237237 .get ()
238238 .join ();
239239 assertThat (jsonEntry ).isNotNull ();
240- assertThat (jsonEntry .rawContent ()).isEqualTo (jsonText );
240+ assertThat (jsonEntry .rawContent ()).isEqualTo (jsonText + '\n' );
241241
242242 // TEXT query should work with viewRaw
243243 final Entry <String > textEntry = repo .file (Query .ofText ("/test.json" ))
244244 .viewRaw (true )
245245 .get ()
246246 .join ();
247247 assertThat (textEntry ).isNotNull ();
248- assertThat (textEntry .rawContent ()).isEqualTo (jsonText );
248+ assertThat (textEntry .rawContent ()).isEqualTo (jsonText + '\n' );
249249 }
250250}
0 commit comments