Skip to content

Commit

Permalink
HHH-14179 fix MultiLineImportExtractorTest on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
famod authored and Sanne committed Aug 24, 2020
1 parent b48d966 commit 2f64fb1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,21 @@ public void testExtraction() throws IOException {
assertThat( commands, notNullValue() );
assertThat( commands.length, is( 6 ) );

// for Windows compatibility, System.lineSeparator() has to be used instead of just "\n"

assertThat( commands[0], startsWith( "CREATE TABLE test_data" ) );

assertThat( commands[1], is( "INSERT INTO test_data VALUES (1, 'sample')" ) );

assertThat( commands[2], is( "DELETE\n FROM test_data" ) );
assertThat( commands[2], is( "DELETE" + System.lineSeparator() + " FROM test_data" ) );

assertThat( commands[3], startsWith( "INSERT INTO test_data VALUES (2," ) );
assertThat( commands[3], containsString( "-- line 2" ) );

assertThat( commands[4], startsWith( "INSERT INTO test_data VALUES (3" ) );
assertThat( commands[4], not( containsString( "third record" ) ) );

assertThat( commands[5], startsWith( "INSERT INTO test_data\nVALUES\n" ) );
assertThat( commands[5], startsWith( "INSERT INTO test_data" + System.lineSeparator() + "VALUES" + System.lineSeparator() ) );
}
}
}
Expand Down

0 comments on commit 2f64fb1

Please sign in to comment.