Annotation of gforth/test/search.fs, revision 1.2
1.1 anton 1: \ test search order wordset partially
2:
3: \ Copyright (C) 2007 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
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:
22: decimal
23:
24: : test-set-order0 ( c-addr u -- n )
25: 2>r get-order 2r> 0 set-order ['] evaluate catch dup if
26: nip nip then
27: >r set-order r> ;
28:
29: : test-set-order1 ( c-addr u wid -- n )
30: 2>r get-order 2r> forth-wordlist 1 set-order ['] evaluate catch dup if
31: nip nip then
32: >r set-order r> ;
33:
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>