2009-09-19 15:14:47 -04:00
|
|
|
! Copyright (C) 2009 Doug Coleman.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
|
|
|
USING: accessors eval kernel lexer nested-comments tools.test ;
|
|
|
|
IN: nested-comments.tests
|
|
|
|
|
|
|
|
! Correct
|
2015-07-03 12:39:59 -04:00
|
|
|
{ } [
|
2009-09-19 15:14:47 -04:00
|
|
|
"USE: nested-comments (* comment *)" eval( -- )
|
|
|
|
] unit-test
|
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
{ } [
|
2009-09-19 15:14:47 -04:00
|
|
|
"USE: nested-comments (* comment*)" eval( -- )
|
|
|
|
] unit-test
|
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
{ } [
|
2009-09-19 15:14:47 -04:00
|
|
|
"USE: nested-comments (* comment
|
|
|
|
*)" eval( -- )
|
|
|
|
] unit-test
|
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
{ } [
|
2009-09-19 15:14:47 -04:00
|
|
|
"USE: nested-comments (* comment
|
|
|
|
*)" eval( -- )
|
|
|
|
] unit-test
|
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
{ } [
|
2009-09-19 15:14:47 -04:00
|
|
|
"USE: nested-comments (* comment
|
|
|
|
*)" eval( -- )
|
|
|
|
] unit-test
|
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
{ } [
|
2009-09-19 15:14:47 -04:00
|
|
|
"USE: nested-comments (* comment
|
|
|
|
(* *)
|
|
|
|
|
|
|
|
*)" eval( -- )
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
! Malformed
|
|
|
|
[
|
|
|
|
"USE: nested-comments (* comment
|
|
|
|
(* *)" eval( -- )
|
|
|
|
] [
|
|
|
|
error>> T{ unexpected f "*)" f } =
|
|
|
|
] must-fail-with
|