diff --git a/pitfall/pitfall/path.rkt b/pitfall/pitfall/path.rkt index 66fc72bc..b31873b9 100644 --- a/pitfall/pitfall/path.rkt +++ b/pitfall/pitfall/path.rkt @@ -11,7 +11,7 @@ (lexer [(eof) eof] [alphabetic (string->symbol lexeme)] - [(:: (:? "-") (:+ numeric) (:? (:: "." (:+ numeric)))) (string->number lexeme)] + [(:: (:? "-") (:* numeric) (:? ".") (:+ numeric)) (string->number lexeme)] [(:or whitespace ",") (lex-1 input-port)])) (slicef-at (for/list ([tok (in-port lex-1 (open-input-string path))]) tok) symbol?)) diff --git a/pitfall/pitfall/test/test10.rkt b/pitfall/pitfall/test/test10.rkt index 2b803a63..02fc6465 100644 --- a/pitfall/pitfall/test/test10.rkt +++ b/pitfall/pitfall/test/test10.rkt @@ -1,8 +1,10 @@ #lang pitfall/pdftest +(define-runtime-path tiger "assets/tiger.json") + (define (proc doc) (send doc translate 220 300) - (for* ([datum (in-list (read (open-input-string (string-replace (file->string "assets/tiger.json") #rx"[,:]" " "))))] + (for* ([datum (in-list (read (open-input-string (string-replace (file->string tiger) #rx"[,:]" " "))))] [part (in-value (apply hash datum))]) (send doc path (hash-ref part 'path)) diff --git a/pitfall/pitfall/test/test5rkt.pdf b/pitfall/pitfall/test/test5rkt.pdf index 2846683a..ca62972b 100644 Binary files a/pitfall/pitfall/test/test5rkt.pdf and b/pitfall/pitfall/test/test5rkt.pdf differ diff --git a/pitfall/pitfall/test/test8.rkt b/pitfall/pitfall/test/test8.rkt index d104070f..07eb2301 100644 --- a/pitfall/pitfall/test/test8.rkt +++ b/pitfall/pitfall/test/test8.rkt @@ -9,8 +9,10 @@ [text "Another fantastic pic" 100 100 (hash 'lineBreak #f)] [image pic 100 160 (hash 'width 412)])) +; node's zlib.deflate makes smaller files, for some reason +; so don't compare file sizes in this case (define-runtime-path this "test8rkt.pdf") -(make-doc this #f proc #:pdfkit #f) ; node's zlib.deflate makes smaller files, for some reason +(make-doc this #f proc #:pdfkit #f) (define-runtime-path that "test8crkt.pdf") (make-doc that #t proc #:pdfkit #f)