Changeset 178 for trunk/thune/tests

Show
Ignore:
Timestamp:
06/10/06 00:38:50 (3 years ago)
Author:
krobillard
Message:

Thune -

Reduce now evaluates blocks.
Added 'to-text and 'console.out. Print & prin are now functions.
Fixed un-initialized word.valBlks.

Location:
trunk/thune/tests
Files:
2 added
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/tests/run_test

    r134 r178  
    77case `uname` in 
    88        "CYGWIN"*) DIFF='diff -w';; 
    9         *) DIFF=diff;; 
     9        *) DIFF='diff -a';; 
    1010esac 
    1111 
  • trunk/thune/tests/working/99.good

    r24 r178  
    1  
    215 bottles of beer on the wall, 5 bottles of beer. 
    32Take one down and pass it around, 4 bottles of beer on the wall. 
  • trunk/thune/tests/working/99.t

    r162 r178  
    11; 99 Bottles of Beer 
    22 
    3 " bottles" :b 
     3"bottles" :b 
    44 
    55[ 
    6   [ 
    7     "^/" n " bottles of beer on the wall, " n " bottles of beer.^/" 
    8     "Take one down and pass it around, " (n 1 sub dup :n) 
    9     b " of beer on the wall.^/" 
    10   ] 
    11   [first reduce prin] iter 
     6    n "bottles of beer on the wall," n 
     7    "bottles of beer.^/Take one down and pass it around," 
     8    n dec dup :n b "of beer on the wall.^/" 
    129] :verse 
    1310 
    1411;99 :n 
    15125 :n 
    16 verse [n 2 gt?] while 
     13[verse print] [n 2 gt?] while 
    1714 
    18 " bottle" :b verse do 
     15"bottle" :b verse print 
    1916 
    20 { 
    21 1 bottle of beer on the wall, 1 bottle of beer. 
     17{1 bottle of beer on the wall, 1 bottle of beer. 
    2218Take one down and pass it around, no more bottles of beer on the wall. 
    2319 
  • trunk/thune/tests/working/parse_block.good

    r124 r178  
    44Minimum: 10 
    55Fired: torpedo 
    6 Range: 11-20 
     6Range: 11 - 20 
    77[] 
  • trunk/thune/tests/working/parse_block.t

    r124 r178  
    88prog [to 'fire] parse . 
    99 
    10  
    11 [prin a first print] proc :out 
    12  
    1310prog [some[ 
    14       'min :a int!        ("Minimum: " out) 
    15     | 'max :a [int! | decimal!]     ("Maximum: " out) 
    16     | 'fire :a word!      ("Fired: " out) 
    17     | 'range :a int! int! ("Range: " prin a first prin "-" prin a second print) 
     11      'min :a int!               (["Minimum:" a/1] print) 
     12    | 'max :a [int! | decimal!]  (["Maximum:" a/1] print) 
     13    | 'fire :a word!             (["Fired:"   a/1] print) 
     14    | 'range :a int! int!        (["Range:" a/1 "-" a/2] print) 
    1815]] parse .