Removing unnecessary newlines and making tests newline accurate

This commit is contained in:
Jay McCarthy 2010-08-18 10:45:01 -06:00
parent 3041bc2870
commit 04d3a23e1c
14 changed files with 10 additions and 39 deletions

View File

@ -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)

View File

@ -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))

View File

@ -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))]

View File

@ -14,4 +14,3 @@ path(d, d).
path(d, c).
path(d, b).
path(d, a).

View File

@ -14,4 +14,3 @@ path(d, b).
path(d, c).
path(d, d).
path(d, a).

View File

@ -14,4 +14,3 @@ path(d, d).
path(d, c).
path(d, b).
path(d, a).

View File

@ -4,5 +4,3 @@ perm(c, a).
perm(b, a).
perm(b, c).
perm(c, b).

View File

@ -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).

View File

@ -1,3 +1,3 @@
add1(2) = (3).
add2(1, 3).

View File

@ -14,4 +14,3 @@ path(d, d).
path(d, c).
path(d, b).
path(d, a).

View File

@ -14,4 +14,3 @@ path(d, b).
path(d, c).
path(d, d).
path(d, a).

View File

@ -14,4 +14,3 @@ path(d, d).
path(d, c).
path(d, b).
path(d, a).

View File

@ -4,5 +4,3 @@ perm(c, a).
perm(b, a).
perm(b, c).
perm(c, b).

View File

@ -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).