Another fix for read-line-split-test
Uniform test suite name
This commit is contained in:
parent
2e4f79161c
commit
842fc396b8
|
@ -66,7 +66,7 @@
|
|||
(call-with-values (lambda () (read-line in-port 'split))
|
||||
(lambda (a b) (and (equal? a "zeile 3")
|
||||
(eof-object? b))))))
|
||||
(make-string-input-port "zeile 1\nzeile 2\nzeile 3\004"))))
|
||||
(make-string-input-port "zeile 1\nzeile 2\nzeile 3"))))
|
||||
|
||||
(add-test! 'read-paragraph-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
|
@ -124,7 +124,7 @@
|
|||
(equal? b "\n"))))))
|
||||
(make-string-input-port "zeile 1\nzeile 2\nparagraph 1\n\nzeile 1\nparagraph 2\n \t\nzeile 1\nparagraph 3\n\n"))))
|
||||
|
||||
(add-test! 'read-delimited-with-char-set-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-with-char-set-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile 1"
|
||||
|
@ -133,7 +133,7 @@
|
|||
(read-delimited (list->char-set (list #\a #\b #\y)) in-port))))
|
||||
(make-string-input-port "zeile 1: nix\nzeile 2: xy\nzeile 3: wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-trim-with-char-set-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-trim-with-char-set-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile 1"
|
||||
|
@ -142,7 +142,7 @@
|
|||
(read-delimited (list->char-set (list #\a #\b #\y)) in-port 'trim))))
|
||||
(make-string-input-port "zeile 1: nix\nzeile 2: xy\nzeile 3: wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-peek-with-char-set-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-peek-with-char-set-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile 1"
|
||||
|
@ -151,7 +151,7 @@
|
|||
(read-delimited (list->char-set (list #\a #\b #\y)) in-port 'peek))))
|
||||
(make-string-input-port "zeile 1: nix\nzeile 2: xy\nzeile 3: wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-concat-with-char-set-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-concat-with-char-set-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile 1:"
|
||||
|
@ -160,7 +160,7 @@
|
|||
(read-delimited (list->char-set (list #\a #\b #\y)) in-port 'concat))))
|
||||
(make-string-input-port "zeile 1: nix\nzeile 2: xy\nzeile 3: wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-split-with-char-set-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-split-with-char-set-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (call-with-values
|
||||
|
@ -175,7 +175,7 @@
|
|||
|
||||
;;------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
(add-test! 'read-delimited-with-string-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-with-string-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile 1"
|
||||
|
@ -184,7 +184,7 @@
|
|||
(read-delimited "aby" in-port))))
|
||||
(make-string-input-port "zeile 1: nix\nzeile 2: xy\nzeile 3: wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-trim-with-string-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-trim-with-string-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile 1"
|
||||
|
@ -193,7 +193,7 @@
|
|||
(read-delimited "aby" in-port 'trim))))
|
||||
(make-string-input-port "zeile 1: nix\nzeile 2: xy\nzeile 3: wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-peek-with-string-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-peek-with-string-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile 1"
|
||||
|
@ -202,7 +202,7 @@
|
|||
(read-delimited "aby" in-port 'peek))))
|
||||
(make-string-input-port "zeile 1: nix\nzeile 2: xy\nzeile 3: wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-concat-with-string-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-concat-with-string-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile 1:"
|
||||
|
@ -211,7 +211,7 @@
|
|||
(read-delimited "aby" in-port 'concat))))
|
||||
(make-string-input-port "zeile 1: nix\nzeile 2: xy\nzeile 3: wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-split-with-string-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-split-with-string-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (call-with-values
|
||||
|
@ -226,7 +226,7 @@
|
|||
|
||||
;; ---------------------------------------------------------------------------------------------------
|
||||
|
||||
(add-test! 'read-delimited-with-character-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-with-character-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile 1"
|
||||
|
@ -235,7 +235,7 @@
|
|||
(read-delimited #\y in-port))))
|
||||
(make-string-input-port "zeile 1: nix\nzeile 2: xy\nzeile 3: wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-trim-with-character-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-trim-with-character-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile 1"
|
||||
|
@ -244,7 +244,7 @@
|
|||
(read-delimited #\y in-port 'trim))))
|
||||
(make-string-input-port "zeile 1: nix\nzeile 2: xy\nzeile 3: wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-peek-with-character-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-peek-with-character-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile 1"
|
||||
|
@ -253,7 +253,7 @@
|
|||
(read-delimited #\y in-port 'peek))))
|
||||
(make-string-input-port "zeile 1: nix\nzeile 2: xy\nzeile 3: wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-concat-with-character-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-concat-with-character-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile 1:"
|
||||
|
@ -262,7 +262,7 @@
|
|||
(read-delimited #\y in-port 'concat))))
|
||||
(make-string-input-port "zeile 1: nix\nzeile 2: xy\nzeile 3: wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-split-with-character-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-split-with-character-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (call-with-values
|
||||
|
@ -277,7 +277,7 @@
|
|||
|
||||
;; ---------------------------------------------------------------------------------------------------
|
||||
|
||||
(add-test! 'read-delimited-with-character-predicate-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-with-character-predicate-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile a"
|
||||
|
@ -286,7 +286,7 @@
|
|||
(read-delimited char-digit? in-port))))
|
||||
(make-string-input-port "zeile a1 nix\nzeile b1 x2\nzeile c1 wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-trim-with-character-predicate-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-trim-with-character-predicate-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile a"
|
||||
|
@ -295,7 +295,7 @@
|
|||
(read-delimited char-digit? in-port 'trim))))
|
||||
(make-string-input-port "zeile a1 nix\nzeile b1 x2\nzeile c1 wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-peek-with-character-predicate-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-peek-with-character-predicate-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile a"
|
||||
|
@ -304,7 +304,7 @@
|
|||
(read-delimited char-digit? in-port 'peek))))
|
||||
(make-string-input-port "zeile a1 nix\nzeile b1 x2\nzeile c1 wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-concat-with-character-predicate-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-concat-with-character-predicate-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (equal? "zeile a1"
|
||||
|
@ -313,7 +313,7 @@
|
|||
(read-delimited char-digit? in-port 'concat))))
|
||||
(make-string-input-port "zeile a1 nix\nzeile b1 x2\nzeile c1 wieder nix\n"))))
|
||||
|
||||
(add-test! 'read-delimited-split-with-character-predicate-test 'read-delimited-strings
|
||||
(add-test! 'read-delimited-split-with-character-predicate-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
((lambda (in-port)
|
||||
(and (call-with-values
|
||||
|
@ -330,7 +330,7 @@
|
|||
|
||||
|
||||
;; XXX read-delimited! and %read-delimited! are confusing bugy
|
||||
;(add-test! 'read-delimited!-with-char-set-test 'read-delimited-strings
|
||||
;(add-test! 'read-delimited!-with-char-set-test 'reading-delimited-strings
|
||||
; (lambda ()
|
||||
; (let ((buf " "))
|
||||
; ((lambda (in-port)
|
||||
|
@ -344,26 +344,26 @@
|
|||
|
||||
;; ====================================================================================================
|
||||
|
||||
(add-test! 'skip-char-set-with-charset-test 'read-delimited-strings
|
||||
(add-test! 'skip-char-set-with-charset-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
(= 6
|
||||
(skip-char-set (list->char-set (list #\a #\b #\c))
|
||||
(make-string-input-port "abccbaxxx")))))
|
||||
|
||||
|
||||
(add-test! 'skip-char-set-with-string-test 'read-delimited-strings
|
||||
(add-test! 'skip-char-set-with-string-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
(= 6
|
||||
(skip-char-set "abc"
|
||||
(make-string-input-port "abccbaxxx")))))
|
||||
|
||||
(add-test! 'skip-char-set-with-character-test 'read-delimited-strings
|
||||
(add-test! 'skip-char-set-with-character-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
(= 6
|
||||
(skip-char-set #\a
|
||||
(make-string-input-port "aaaaaaxxx")))))
|
||||
|
||||
(add-test! 'skip-char-set-with-character-predicate-test 'read-delimited-strings
|
||||
(add-test! 'skip-char-set-with-character-predicate-test 'reading-delimited-strings
|
||||
(lambda ()
|
||||
(= 6
|
||||
(skip-char-set char-digit?
|
||||
|
|
Loading…
Reference in New Issue