Fix assert-depth usage
parent
4533e0e55e
commit
66c9eb089a
|
@ -1,7 +1,7 @@
|
|||
USING: arrays math parser tools.test kernel generic words
|
||||
io.streams.string namespaces classes effects source-files
|
||||
assocs sequences strings io.files definitions continuations
|
||||
sorting tuples compiler.units ;
|
||||
sorting tuples compiler.units debugger ;
|
||||
IN: temporary
|
||||
|
||||
[
|
||||
|
@ -426,3 +426,7 @@ IN: temporary
|
|||
] unit-test
|
||||
|
||||
[ t ] [ "foo" "temporary" lookup symbol? ] unit-test
|
||||
|
||||
[ "resource:core/parser/test/assert-depth.factor" run-file ]
|
||||
[ relative-overflow-stack { 1 2 3 } sequence= ]
|
||||
must-fail-with
|
||||
|
|
|
@ -507,7 +507,7 @@ SYMBOL: interactive-vocabs
|
|||
] recover ;
|
||||
|
||||
: run-file ( file -- )
|
||||
[ [ parse-file call ] keep ] assert-depth drop ;
|
||||
[ dup parse-file call ] assert-depth drop ;
|
||||
|
||||
: ?run-file ( path -- )
|
||||
dup resource-exists? [ run-file ] [ drop ] if ;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
1 2 3
|
|
@ -80,11 +80,10 @@ DEFER: <% delimiter
|
|||
"quiet" on
|
||||
parser-notes off
|
||||
templating-vocab use+
|
||||
dup source-file file set ! so that reload works properly
|
||||
[
|
||||
?resource-path file-contents
|
||||
[ eval-template ] [ html-error. drop ] recover
|
||||
] keep
|
||||
! so that reload works properly
|
||||
dup source-file file set
|
||||
dup ?resource-path file-contents
|
||||
[ eval-template ] [ html-error. drop ] recover
|
||||
] with-file-vocabs
|
||||
] assert-depth drop ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue