Removing unnecessary newlines and making tests newline accurate
This commit is contained in:
parent
3041bc2870
commit
04d3a23e1c
|
@ -15,7 +15,7 @@
|
|||
(datum->syntax #f (format-statement s) (assertion-srcloc s))))))
|
||||
|
||||
(define (print-questions ls)
|
||||
(displayln
|
||||
(displayln
|
||||
(format-questions ls)))
|
||||
|
||||
(define (eval-program p)
|
||||
|
|
|
@ -48,10 +48,9 @@
|
|||
(format-external e)]))
|
||||
(define (format-questions ls)
|
||||
(v-concat
|
||||
(append (map (lambda (l)
|
||||
(h-append (format-question l) dot))
|
||||
ls)
|
||||
(list line))))
|
||||
(map (lambda (l)
|
||||
(h-append (format-question l) dot))
|
||||
ls)))
|
||||
(define (format-clause c)
|
||||
(if (empty? (clause-body c))
|
||||
(format-literal (clause-head c))
|
||||
|
|
|
@ -14,15 +14,11 @@
|
|||
(define test-rkt (build-path examples-dir (format "~a.rkt" t)))
|
||||
(define test-txt (build-path examples-dir (format "~a.txt" t)))
|
||||
(test-equal? t
|
||||
(filter (lambda (l)
|
||||
(not (string=? l "")))
|
||||
(with-input-from-string
|
||||
(with-output-to-string
|
||||
(lambda () (dynamic-require test-rkt #f)))
|
||||
port->lines))
|
||||
(filter (lambda (l)
|
||||
(not (string=? l "")))
|
||||
(file->lines test-txt))))
|
||||
(with-input-from-string
|
||||
(with-output-to-string
|
||||
(lambda () (dynamic-require test-rkt #f)))
|
||||
port->lines)
|
||||
(file->lines test-txt)))
|
||||
|
||||
(define (test-files d)
|
||||
(for ([f (in-list (directory-list d))]
|
||||
|
|
|
@ -14,4 +14,3 @@ path(d, d).
|
|||
path(d, c).
|
||||
path(d, b).
|
||||
path(d, a).
|
||||
|
||||
|
|
|
@ -14,4 +14,3 @@ path(d, b).
|
|||
path(d, c).
|
||||
path(d, d).
|
||||
path(d, a).
|
||||
|
||||
|
|
|
@ -14,4 +14,3 @@ path(d, d).
|
|||
path(d, c).
|
||||
path(d, b).
|
||||
path(d, a).
|
||||
|
||||
|
|
|
@ -4,5 +4,3 @@ perm(c, a).
|
|||
perm(b, a).
|
||||
perm(b, c).
|
||||
perm(c, b).
|
||||
|
||||
|
||||
|
|
|
@ -1,26 +1,19 @@
|
|||
parent(john, douglas).
|
||||
|
||||
|
||||
parent(john, douglas).
|
||||
parent(bob, john).
|
||||
parent(ebbon, bob).
|
||||
|
||||
parent(john, douglas).
|
||||
|
||||
|
||||
ancestor(ebbon, bob).
|
||||
ancestor(bob, john).
|
||||
ancestor(john, douglas).
|
||||
ancestor(bob, douglas).
|
||||
ancestor(ebbon, john).
|
||||
ancestor(ebbon, douglas).
|
||||
|
||||
ancestor(bob, john).
|
||||
ancestor(ebbon, john).
|
||||
|
||||
parent(john, douglas).
|
||||
parent(ebbon, bob).
|
||||
|
||||
ancestor(ebbon, bob).
|
||||
ancestor(john, douglas).
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
add1(2) = (3).
|
||||
|
||||
add2(1, 3).
|
||||
|
||||
|
|
|
@ -14,4 +14,3 @@ path(d, d).
|
|||
path(d, c).
|
||||
path(d, b).
|
||||
path(d, a).
|
||||
|
||||
|
|
|
@ -14,4 +14,3 @@ path(d, b).
|
|||
path(d, c).
|
||||
path(d, d).
|
||||
path(d, a).
|
||||
|
||||
|
|
|
@ -14,4 +14,3 @@ path(d, d).
|
|||
path(d, c).
|
||||
path(d, b).
|
||||
path(d, a).
|
||||
|
||||
|
|
|
@ -4,5 +4,3 @@ perm(c, a).
|
|||
perm(b, a).
|
||||
perm(b, c).
|
||||
perm(c, b).
|
||||
|
||||
|
||||
|
|
|
@ -1,26 +1,19 @@
|
|||
parent(john, douglas).
|
||||
|
||||
|
||||
parent(john, douglas).
|
||||
parent(bob, john).
|
||||
parent(ebbon, bob).
|
||||
|
||||
parent(john, douglas).
|
||||
|
||||
|
||||
ancestor(ebbon, bob).
|
||||
ancestor(bob, john).
|
||||
ancestor(john, douglas).
|
||||
ancestor(bob, douglas).
|
||||
ancestor(ebbon, john).
|
||||
ancestor(ebbon, douglas).
|
||||
|
||||
ancestor(bob, john).
|
||||
ancestor(ebbon, john).
|
||||
|
||||
parent(john, douglas).
|
||||
parent(ebbon, bob).
|
||||
|
||||
ancestor(ebbon, bob).
|
||||
ancestor(john, douglas).
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user