Browse Source

Fix duplicate tests

Reported-by: Stig Brautaset <stig@brautaset.org>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00187.html>
Nicolas Goaziou 2 years ago
parent
commit
7ce9a24115
3 changed files with 22 additions and 61 deletions
  1. 1 1
      testing/lisp/test-ob-lilypond.el
  2. 21 20
      testing/lisp/test-ob-shell.el
  3. 0 40
      testing/lisp/test-ob.el

+ 1 - 1
testing/lisp/test-ob-lilypond.el

@@ -162,7 +162,7 @@
 (ert-deftest ob-lilypond/ly-gen-html ()
   (should (boundp 'org-babel-lilypond-gen-html)))
 
-(ert-deftest ob-lilypond/ly-gen-html ()
+(ert-deftest ob-lilypond/ly-gen-pdf ()
   (should (boundp 'org-babel-lilypond-gen-pdf)))
 
 (ert-deftest ob-lilypond/use-eps ()

+ 21 - 20
testing/lisp/test-ob-shell.el

@@ -62,29 +62,30 @@ ob-comint.el, which was not previously tested."
 
 (ert-deftest ob-shell/generic-uses-no-assoc-arrays ()
   "No associative arrays for generic"
-  (org-test-at-id "bec1a5b0-4619-4450-a8c0-2a746b44bf8d"
-    (org-babel-next-src-block)
-    (should (equal "first one second two third three"
-                   (org-babel-execute-src-block)))))
+  (should
+   (equal "first one second two third three"
+	  (org-test-at-id "bec1a5b0-4619-4450-a8c0-2a746b44bf8d"
+	    (org-babel-next-src-block)
+	    (org-babel-execute-src-block))))
+  (should
+   (equal "bread 2 kg spaghetti 20 cm milk 50 dl"
+	  (org-test-at-id "82320a48-3409-49d7-85c9-5de1c6d3ff87"
+	    (org-babel-next-src-block)
+	    (org-babel-execute-src-block)))))
 
 (ert-deftest ob-shell/bash-uses-assoc-arrays ()
   "Bash associative arrays"
-  (org-test-at-id "bec1a5b0-4619-4450-a8c0-2a746b44bf8d"
-    (org-babel-next-src-block 2)
-    (should (equal "two" (org-babel-execute-src-block)))))
-
-(ert-deftest ob-shell/generic-uses-no-assoc-arrays ()
-  "No associative arrays for generic"
-  (org-test-at-id "82320a48-3409-49d7-85c9-5de1c6d3ff87"
-    (org-babel-next-src-block)
-    (should (equal "bread 2 kg spaghetti 20 cm milk 50 dl"
-                   (org-babel-execute-src-block)))))
-
-(ert-deftest ob-shell/bash-uses-assoc-arrays ()
-  "Bash associative arrays as strings for the row"
-  (org-test-at-id "82320a48-3409-49d7-85c9-5de1c6d3ff87"
-    (org-babel-next-src-block 2)
-    (should (equal "20 cm" (org-babel-execute-src-block)))))
+  (should
+   (equal "two"
+	  (org-test-at-id "bec1a5b0-4619-4450-a8c0-2a746b44bf8d"
+	    (org-babel-next-src-block 2)
+	    (org-babel-execute-src-block))))
+  ;; Bash associative arrays as strings for the row.
+  (should
+   (equal "20 cm"
+	  (org-test-at-id "82320a48-3409-49d7-85c9-5de1c6d3ff87"
+	    (org-babel-next-src-block 2)
+	    (org-babel-execute-src-block)))))
 
 (ert-deftest ob-shell/simple-list ()
   "Test list variables in shell."

+ 0 - 40
testing/lisp/test-ob.el

@@ -923,21 +923,6 @@ replacement happens correctly."
 * next heading")))
 	  '("sh" "emacs-lisp")))
 
-(ert-deftest test-ob/org-babel-remove-result--results-list ()
-  "Test `org-babel-remove-result' with :results list."
-  (test-ob-verify-result-and-removed-result
-   "- 1
-- 2
-- 3
-- (quote (4 5))"
-
-   "* org-babel-remove-result
-#+begin_src emacs-lisp :results list
-'(1 2 3 '(4 5))
-#+end_src
-
-* next heading"))
-
 (ert-deftest test-ob/org-babel-results-indented-wrap ()
   "Ensure that wrapped results are inserted correction when indented.
 If not inserted correctly then the second evaluation will fail
@@ -967,18 +952,6 @@ trying to find the :END: marker."
     (should (search-forward "[[file:foo][bar]]" nil t))
     (should (search-forward "[[file:foo][foo]]" nil t))))
 
-(ert-deftest test-ob/org-babel-remove-result--results-pp ()
-  "Test `org-babel-remove-result' with :results pp."
-  (test-ob-verify-result-and-removed-result
-   ": \"I /am/ working!\""
-
-   "* org-babel-remove-result
-#+begin_src emacs-lisp :results pp
-\"I /am/ working!\")
-#+end_src
-
-* next heading"))
-
 (ert-deftest test-ob/inline-src_blk-preceded-punct-preceded-by-point ()
   (let ((test-line ".src_emacs-lisp[ :results verbatim ]{ \"x\"  }")
 	(org-babel-inline-result-wrap "=%s="))
@@ -1034,19 +1007,6 @@ replacement happens correctly."
 		     (buffer-substring-no-properties
 		      (point-min) (point-max))))))
 
-(ert-deftest test-ob/org-babel-remove-result--results-default ()
-  "Test `org-babel-remove-result' with default :results."
-  (mapcar (lambda (language)
-	    (test-ob-verify-result-and-removed-result
-	     "\n"
-	     (concat
-	      "* org-babel-remove-result
-#+begin_src " language "
-#+end_src
-
-* next heading")))
-	  '("sh" "emacs-lisp")))
-
 (ert-deftest test-ob/org-babel-remove-result--results-list ()
   "Test `org-babel-remove-result' with :results list."
   (test-ob-verify-result-and-removed-result