Paste: word not recognised?

Author: ambimorph
Mode: factor
Date: Tue, 17 Jun 2014 17:20:19
Plain Text |
! protagonist/protagonist.factor
USING: io sequences kernel strings io.directories ;
IN: protagonist

TUPLE: tagsystem { base-directory string initial: "./" } ;
: create-tagsystem ( string -- )
    ".protagonist" append make-directory ;

! protagonist/protagonist-tests.factor
USING: tools.test sequences kernel protagonist ;
IN: protagonist.tests

! I want this test to first create a tagsystem by making a base directory for tags to live in.
! So the first test is create the directory and then check that it is there.

[ t ] [ tagsystem new base-directory>> ".protagonist" append exists? ] [ create-tagsystem ] unit-test

! ----
! I run
! $ FACTOR_ROOTS=.. ~/factor/factor protagonist-tests.factor
! and get:

! protagonist-tests.factor

! 7: [ t ] [ tagsystem new base-directory>> ".protagonist" append exists? ] [ create-tagsystem ] unit-test
                                         ^
! No word named “base-directory>>” found in current vocabulary search path

New Annotation

Summary:
Author:
Mode:
Body: