use of liquibase.util.RegexMatcher in project liquibase by liquibase.
the class AbstractIntegrationTest method testEncodingUpdating2SQL.
@Test
public void testEncodingUpdating2SQL() throws Exception {
if (database == null) {
return;
}
Liquibase liquibase = createLiquibase(encodingChangeLog);
StringWriter writer = new StringWriter();
liquibase.update(this.contexts, writer);
assertTrue("Update to SQL preserves encoding", new RegexMatcher(writer.toString(), new String[] { //For the UTF-8 encoded cvs
"^.*INSERT.*VALUES.*àèìòùáéíóúÀÈÌÒÙÁÉÍÓÚâêîôûäëïöü.*$", "çñ®", //For the latin1 one
"^.*INSERT.*VALUES.*àèìòùáéíóúÀÈÌÒÙÁÉÍÓÚâêîôûäëïöü.*$", "çñ®" }).allMatchedInSequentialOrder());
}
Aggregations