modern: Fix strings. They were out of order.

modern-harvey2
Doug Coleman 2017-08-26 20:26:05 -05:00
parent 5bb1c2b520
commit 4ede4769e2
2 changed files with 12 additions and 2 deletions

View File

@ -1,6 +1,6 @@
! Copyright (C) 2017 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: modern modern.slices tools.test ;
USING: modern modern.slices multiline tools.test ;
IN: modern.tests
! Comment
@ -129,3 +129,13 @@ IN: modern.tests
{ f } [ "FOO:" section-open? ] unit-test
{ f } [ ";FOO" section-close? ] unit-test
{ f } [ "FOO" section-close? ] unit-test
! Strings
{
{ { "url\"" "google.com" "\"" } }
} [ [[ url"google.com" ]] string>literals >strings ] unit-test
{
{ { "\"" "google.com" "\"" } }
} [ [[ "google.com" ]] string>literals >strings ] unit-test

View File

@ -120,7 +120,7 @@ MACRO:: read-matched ( ch -- quot: ( n string tag -- n' string slice' ) )
n' [ n string string-expected-got-eof ] unless
n n' 1 - string <slice>
n' 1 - n' string <slice>
tag 1 cut-slice* 4array ;
tag -rot 3array ;
: take-comment ( n string slice -- n' string comment )
2over ?nth char: \[ = [