Quellcode durchsuchen

test-ob-maxima: Fix maxima matrix test

* testing/lisp/test-ob-maxima.el (ob-maxima/matrix-output): Remove lines
  starting with ";;" from the result of `org-babel-execute-src-block'.

This fix works around the occurance of lines like

;; loading #P"/home/b/.../numericalio/encode-decode-float.fasl"

in the output of maxima.

Maxima version: "5.38.1"
Lisp implementation type: "SBCL"
Lisp implementation version: "1.3.6"
Marco Wahl vor 8 Jahren
Ursprung
Commit
b7b93a0c2c
1 geänderte Dateien mit 14 neuen und 1 gelöschten Zeilen
  1. 14 1
      testing/lisp/test-ob-maxima.el

+ 14 - 1
testing/lisp/test-ob-maxima.el

@@ -65,7 +65,20 @@
   "Test of table output"
   (org-test-at-id "cc158527-b867-4b1d-8ae0-b8c713a90fd7"
     (org-babel-next-src-block)
-    (should (equal '((1 2 3) (2 3 4) (3 4 5)) (org-babel-execute-src-block)))))
+    (should
+     (equal
+      '((1 2 3) (2 3 4) (3 4 5))
+      ((lambda (lista)
+	 "Drop disturbing lines.
+This is a workaround to skip informational output from maxima."
+	 (reverse
+	  (reduce (lambda (x y)
+		    (if (equal ";;" (car y))
+			x
+		      (cons  y x)))
+		  lista)))
+       (cons nil
+	     (org-babel-execute-src-block)))))))
 
 (provide 'test-ob-maxima)