groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <pa...@asert.com.au>
Subject Re: Slashy strings in GroovyConsole
Date Wed, 14 Jun 2017 10:32:24 GMT
What bo zhang said or use dollar slashy string.

Cheers, Paul.

On Wed, Jun 14, 2017 at 7:37 PM, bo zhang <zhangbodut@gmail.com> wrote:

> def scriptDir = /C:\Folder1\My Documents\Folder2\Version\etc\//
>
> note the last slash. \/ is escaping /
>
> On Wed, Jun 14, 2017 at 4:44 PM, Dmytro Shyshchenko <shyschenko@gmail.com>
> wrote:
>
>> Long time ago I was using slashy strings in my groovy scripts for the
>> paths on Windows. Somehting like this:
>> def scriptDir = /C:\Folder1\My Documents\Folder2\Version\etc\/
>>
>> However in the recent versions, like 2.3.6 or 2.4.11, I can no longer
>> execute those scripts via a GroovyConsole. It always gave me an error
>> pointing to the last charecter of the script. Like this:
>> unexpected char: 0xFFFF at line: 19, column: 13
>> which was a bit misleading...
>>
>> When I change the paths to a "normal" srtings, everything works fine, as
>> it was before.
>> def scriptDir = "C:\\Folder1\\My Documents\\Folder2\\Version\\etc\\"
>>
>> Is it a bug? Shall I report it?
>>
>>
>>
>

Mime
View raw message