Changeset 40275 in project


Ignore:
Timestamp:
07/12/21 16:00:01 (2 weeks ago)
Author:
sjamaan
Message:

r7rs: Fix #1734 and add regression test

Location:
release/5/r7rs
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/5/r7rs/1.0.5/r7rs.scm

    r35586 r40275  
    3131                         'f64 list->f64vector)])
    3232      (lambda (tag port)
    33         (let* ([x (read port)])
    34           (cond [(or (eq? tag 'f) (eq? tag 'F)) #f]
    35                 [(memq tag consers) => (lambda (c) ((##sys#slot (##sys#slot c 1) 0) (read port)))]
    36                 [else (##sys#read-error port "illegal bytevector syntax" tag)])))))
     33        (cond [(or (eq? tag 'f) (eq? tag 'F)) #f]
     34              [(memq tag consers) => (lambda (c) ((##sys#slot (##sys#slot c 1) 0) (read port)))]
     35              [else (##sys#read-error port "illegal bytevector syntax" tag)]))))
    3736  (set! ##sys#user-read-hook
    3837        (lambda (char port)
  • release/5/r7rs/1.0.5/tests/run.scm

    r39020 r40275  
    584584    (test #u8() (bytevector-append #u8() #u8()))
    585585    (test #u8(0 1) (bytevector-append #u8(0) #u8(1)))
    586     (test #u8(0 1 2 3 4 5) (bytevector-append #u8(0 1) #u8(2 3) #u8(4 5)))))
     586    (test #u8(0 1 2 3 4 5) (bytevector-append #u8(0 1) #u8(2 3) #u8(4 5))))
     587
     588  (test-group "bytevector read syntax"
     589    (test (bytevector 1 2 3) (read-from-string "#u8(1 2 3)")))
     590
     591  ;; Regression test for #1734
     592  (test-group "srfi-4 read syntax compatibility"
     593    (test #f32(1.2) (read-from-string "#f32(1.2)"))))
    587594
    588595(test-group "6.10: Control features"
  • release/5/r7rs/trunk/r7rs.scm

    r35586 r40275  
    3131                         'f64 list->f64vector)])
    3232      (lambda (tag port)
    33         (let* ([x (read port)])
    34           (cond [(or (eq? tag 'f) (eq? tag 'F)) #f]
    35                 [(memq tag consers) => (lambda (c) ((##sys#slot (##sys#slot c 1) 0) (read port)))]
    36                 [else (##sys#read-error port "illegal bytevector syntax" tag)])))))
     33        (cond [(or (eq? tag 'f) (eq? tag 'F)) #f]
     34              [(memq tag consers) => (lambda (c) ((##sys#slot (##sys#slot c 1) 0) (read port)))]
     35              [else (##sys#read-error port "illegal bytevector syntax" tag)]))))
    3736  (set! ##sys#user-read-hook
    3837        (lambda (char port)
  • release/5/r7rs/trunk/tests/run.scm

    r39020 r40275  
    584584    (test #u8() (bytevector-append #u8() #u8()))
    585585    (test #u8(0 1) (bytevector-append #u8(0) #u8(1)))
    586     (test #u8(0 1 2 3 4 5) (bytevector-append #u8(0 1) #u8(2 3) #u8(4 5)))))
     586    (test #u8(0 1 2 3 4 5) (bytevector-append #u8(0 1) #u8(2 3) #u8(4 5))))
     587
     588  (test-group "bytevector read syntax"
     589    (test (bytevector 1 2 3) (read-from-string "#u8(1 2 3)")))
     590
     591  ;; Regression test for #1734
     592  (test-group "srfi-4 read syntax compatibility"
     593    (test #f32(1.2) (read-from-string "#f32(1.2)"))))
    587594
    588595(test-group "6.10: Control features"
Note: See TracChangeset for help on using the changeset viewer.