[
"USE: kernel UNUSE: kernel dup" <string-reader> "unuse-test" parse-stream
-] [ error>> error>> error>> no-word-error? ] must-fail-with
\ No newline at end of file
+] [ error>> error>> error>> no-word-error? ] must-fail-with
+
+[ ] [ [ "vocabs.loader.test.l" forget-vocab ] with-compilation-unit ] unit-test
+
+[
+ [ "vocabs.loader.test.l" use-vocab ] must-fail
+ [ f ] [ "vocabs.loader.test.l" manifest get search-vocab-names>> key? ] unit-test
+ [ ] [ "vocabs.loader.test.l" unuse-vocab ] unit-test
+ [ f ] [ "vocabs.loader.test.l" manifest get search-vocab-names>> key? ] unit-test
+] with-file-vocabs
dup using-vocab?
[ vocab-name "Already using ``" "'' vocabulary" surround note. ] [
manifest get
- [ [ vocab-name ] dip search-vocab-names>> conjoin ]
[ [ load-vocab ] dip search-vocabs>> push ]
+ [ [ vocab-name ] dip search-vocab-names>> conjoin ]
2bi
] if ;
: unuse-vocab ( vocab -- )
dup using-vocab? [
manifest get
- [ [ vocab-name ] dip search-vocab-names>> delete-at ]
[ [ load-vocab ] dip search-vocabs>> delq ]
+ [ [ vocab-name ] dip search-vocab-names>> delete-at ]
2bi
] [ drop ] if ;