regex patch
[clinton/parenscript.git] / t / ref2test.lisp
index f49677b..84c3dde 100644 (file)
@@ -1,16 +1,16 @@
 (in-package :js-test)
 ;;Generates automatic tests from the reference
 
+(defparameter +this-dir+ (asdf:component-pathname (asdf:find-component (asdf:find-system :parenscript.test) "t")))
 (defparameter +reference-file+ (merge-pathnames
-                                (make-pathname :directory '(:relative :back "docs"))
-                                (make-pathname :name "reference"
-                                               :type "lisp"
-                                               :defaults *load-truename*)))
-
+                                (make-pathname :directory '(:relative :back "docs")
+                                               :name "reference"
+                                               :type "lisp")
+                                +this-dir+))
 
 (defparameter +generate-file+ (make-pathname :name "reference-tests"
                                               :type "lisp"
-                                              :defaults *load-truename*))
+                                              :defaults +this-dir+))
 
 (defparameter +head+ "(in-package :js-test)
 ;; Tests of everything in the reference.
@@ -67,8 +67,8 @@
                  ((search "=>" (subseq built (+ 1 sep-pos)))
                   (format t "Error , two separators found~%"))
                  ((and (string= heading "regular-expression-literals")
-                       (= 2 heading-count)) ;requires cl-interpol reader
-                  (format t "Skipping regex-test two~&"))
+                       (= 3 heading-count)) ;requires cl-interpol reader
+                  (format t "Skipping regex-test with cl-interpol&"))
                  ((and lisp-part javascript-part)
                   (format out-stream "(test-ps-js ~a-~a~%  ~a~%  \"~a\")~%~%"
                           heading heading-count
                                               (list #\Newline))
                                             line))))))
         (format out-stream "~%(run-tests)~%")))))
+
+
+
+;; (make-reference-tests-dot-lisp)
\ No newline at end of file