[arquillian-issues] [JBoss JIRA] (ARQ-1352) Script can not insert unix path separator '/' into the DB

Aslak Knutsen (JIRA) issues at jboss.org
Mon May 12 07:44:00 EDT 2014


     [ https://issues.jboss.org/browse/ARQ-1352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aslak Knutsen updated ARQ-1352:
-------------------------------

    Fix Version/s: persistence_1.0.0.Alpha7
                       (was: persistence_1.0.0.next)


> Script can not insert unix path separator '/' into the DB
> ---------------------------------------------------------
>
>                 Key: ARQ-1352
>                 URL: https://issues.jboss.org/browse/ARQ-1352
>             Project: Arquillian
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Extension - Persistence
>    Affects Versions: persistence_1.0.0.Alpha6
>            Reporter: Sandor Bodo-Merle
>            Assignee: Sandor Bodo-Merle
>             Fix For: persistence_1.0.0.Alpha7
>
>         Attachments: 0001-ScriptExecutor-fix-commit-parsing.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)


More information about the arquillian-issues mailing list