Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-1352

Script can not insert unix path separator '/' into the DB

    XMLWordPrintable

    Details

      Description

      I have a test class which try to insert a unix path value in the DB on schema creation:

      @CreateSchema(

      {"setup.sql"}

      )
      public class UserTest {
      ...
      }

      Th the ScriptExecutor introduced in 1.0.0.Alpha6 will iron out the '/' character from the path on insert - like in the following small example:

      public class main {
      public static void main(String[] args) {
      final String ANSI_SQL_COMMENTS_PATTERN = "--.|//.|(?s)/\\\\*.*?\\\\*/|(?s)

      {.*?\\}

      ";
      String script = "INSERT INTO config (name, value) VALUES ('path', '/home/sbodo/test.txt');";
      System.out.println(script.replaceAll(ANSI_SQL_COMMENTS_PATTERN, ""));
      }
      }

      Output is:
      INSERT INTO config (name, value) VALUES ('path', 'sbodo/test.txt');
      instead of:
      INSERT INTO config (name, value) VALUES ('path', '/home/sbodo/test.txt');

      Tested with Jboss 7.1.1 and Postgres 9.1.
      The test worked fine in 1.0.0.Alpha5.

        Attachments

          Activity

            People

            Assignee:
            sbodo Sandor Bodo-Merle (Inactive)
            Reporter:
            sbodo Sandor Bodo-Merle (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: