altos/scheme: Split tests out from build sources
[fw/altos] / src / scheme / ao_scheme_string.scheme
index 10e6fa4f03833d2f4da75ff5d1818ce8391bcfed..99f16faba7dd316709c3a7e4641d6bd1f2e141ad 100644 (file)
 ;
 ; string functions placed in ROM
 
+(define string (lambda chars (list->string chars)))
+
+(string #\a #\b #\c)
+
 (define string-map
   (lambda (proc . strings)
                                        ; result length is min of arg lengths
@@ -34,7 +38,7 @@
     )
   )
 
-(_??_ (string-map (lambda (x) (+ 1 x)) "HAL") "IBM")
+(string-map (lambda (x) (+ 1 x)) "HAL")
 
 (define string-copy!
   (lambda (t a f . args)
@@ -72,9 +76,9 @@
     )
   )
 
-(_??_ (string-copy! (make-string 10) 0 "hello" 0 5) "hello     ")
-(_??_ (string-copy! (make-string 10) 1 "hello" 0 5) " hello    ")
-(_??_ (string-copy! (make-string 10) 0 "hello" 0 5) "hello     ")
+(string-copy! (make-string 10) 0 "hello" 0 5)
+(string-copy! (make-string 10) 1 "hello" 0 5)
+(string-copy! (make-string 10) 0 "hello" 0 5)
 
 (define (string-upcase s) (string-map char-upcase s))
 (define (string-downcase s) (string-map char-downcase s))
     )
   )
 
-(_??_ (string-copy "hello" 0 1) "h")
-(_??_ (string-copy "hello" 1) "ello")
-(_??_ (string-copy "hello") "hello")
+(string-copy "hello" 0 1)
+(string-copy "hello" 1)
+(string-copy "hello")
 
 (define substring string-copy)
 
     )
   )
 
-(_??_ (string-fill! (make-string 10) #\a) "aaaaaaaaaa")
-(_??_ (string-fill! (make-string 10) #\a 1 2) " a        ")
+(string-fill! (make-string 10) #\a)
+(string-fill! (make-string 10) #\a 1 2)
 
 (define string-for-each
   (lambda (proc . strings)
     )
   )
 
-(_??_ (string-for-each write-char "IBM\n") #t)
+(string-for-each write-char "IBM\n")