Annotation of gforth/test/search.fs, revision 1.4

1.1       anton       1: \ test search order wordset partially
                      2: 
1.4     ! anton       3: \ Copyright (C) 2007,2010 Free Software Foundation, Inc.
1.1       anton       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
1.2       anton       9: \ as published by the Free Software Foundation, either version 3
1.1       anton      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
1.2       anton      18: \ along with this program. If not, see http://www.gnu.org/licenses/.
1.1       anton      19: 
                     20: require ./tester.fs
                     21: 
1.3       anton      22: testing search order wordset
1.1       anton      23: decimal
                     24: 
                     25: : test-set-order0 ( c-addr u -- n )
                     26:     2>r get-order 2r> 0 set-order ['] evaluate catch dup if
                     27:         nip nip then
                     28:     >r set-order r> ;
                     29: 
                     30: : test-set-order1 ( c-addr u wid -- n )
                     31:     2>r get-order 2r> forth-wordlist 1 set-order ['] evaluate catch dup if
                     32:         nip nip then
                     33:     >r set-order r> ;
                     34: 
                     35: { s" order"      test-set-order0 -> -13 }
                     36: { s" 5e"         test-set-order0 -> 0 5e }
                     37: { s" root +"     test-set-order1 -> -13 }
                     38: { s" root forth" test-set-order1 -> 0 }
                     39: 

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