Annotation of gforth/other-tests.fs, revision 1.5

1.1       anton       1: \ various tests, especially for bugs that have been fixed
                      2: 
1.4       anton       3: \ Copyright (C) 1997 Free Software Foundation, Inc.
                      4: 
                      5: \ This file is part of Gforth.
                      6: 
                      7: \ Gforth is free software; you can redistribute it and/or
                      8: \ modify it under the terms of the GNU General Public License
                      9: \ as published by the Free Software Foundation; either version 2
                     10: \ of the License, or (at your option) any later version.
                     11: 
                     12: \ This program is distributed in the hope that it will be useful,
                     13: \ but WITHOUT ANY WARRANTY; without even the implied warranty of
                     14: \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     15: \ GNU General Public License for more details.
                     16: 
                     17: \ You should have received a copy of the GNU General Public License
                     18: \ along with this program; if not, write to the Free Software
                     19: \ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
                     20: 
1.1       anton      21: \ combination of marker and locals
                     22: marker foo1
                     23: marker foo2
                     24: foo2
                     25: 
                     26: : bar { xxx yyy } ;
                     27: 
                     28: foo1
                     29: 
1.3       anton      30: \ locals in an if structure
                     31: : locals-test1
                     32:     lp@ swap
                     33:     if
                     34:        { a } a
                     35:     else
                     36:     endif
                     37:     lp@ <> abort" locals in if error 1" ;
                     38: 
                     39: 0 locals-test1
                     40: 1 locals-test1
                     41: 
1.5     ! anton      42: \ look for primitives
        !            43: 
        !            44: ' + look 0= throw ( nt )
        !            45: s" +" find-name <> throw
        !            46: 
        !            47: \ represent
        !            48: 
        !            49: 1e pad 5 represent -1 <> swap 0 <> or swap 1 <> or throw
        !            50: 
1.1       anton      51: \ comments across several lines
                     52: 
                     53: ( fjklfjlas;d
                     54: abort" ( does not work across lines"
1.2       anton      55: )
                     56: 
                     57: s" ( testing ( without delimited by newline in non-files" evaluate
                     58: 
                     59: \ last test!
                     60: \ testing '(' without ')' at end-of-file
                     61: ." expect ``warning: ')' missing''" cr
                     62: (

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>