emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [patch][babel] Fix latest block export tests to suit Emacs 22
@ 2012-01-06  8:21 Martyn Jago
  2012-01-06  8:46 ` Bastien
  0 siblings, 1 reply; 3+ messages in thread
From: Martyn Jago @ 2012-01-06  8:21 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]


What appears to be a subtle difference in html export detail between
Emacs 22 and Emacs 23+ breaks these latest tests on Emacs 22.

The attached patch fixes them (and the subtle difference is not relevant
to these tests).

Best, Martyn


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: changes to block export tests to suit Emacs 22 --]
[-- Type: text/x-patch, Size: 4541 bytes --]

From b67f2c34fb2bea791b847c3dbb7dc26e313f779f Mon Sep 17 00:00:00 2001
From: Martyn Jago <martyn.jago@btinternet.com>
Date: Fri, 6 Jan 2012 08:08:21 +0000
Subject: [PATCH] Changes to latest block export tests to suit Emacs 22.
 * testing/lisp/test-ob-exp.el:

Changes to latest block export tests to suit Emacs 22.
---
 testing/lisp/test-ob-exp.el |   40 ++++++++++++++--------------------------
 1 files changed, 14 insertions(+), 26 deletions(-)

diff --git a/testing/lisp/test-ob-exp.el b/testing/lisp/test-ob-exp.el
index 85af683..8ef27dd 100644
--- a/testing/lisp/test-ob-exp.el
+++ b/testing/lisp/test-ob-exp.el
@@ -73,7 +73,7 @@
   (org-test-at-id "eb1f6498-5bd9-45e0-9c56-50717053e7b7"
     (org-narrow-to-subtree)
     (let ((exported-html
-	   (org-export-as-html nil nil nil 'string))
+	   (org-export-as-html nil nil nil 'string 'body-only))
 	  (test-point 0))
 
       (org-test-with-temp-text-in-file
@@ -86,9 +86,7 @@
 			      x
 			      nil t)))
 		  (setq test-point (point)))
-		'("<head>" "</head>" "<body>"
-		  "<code>:noweb</code> header argument expansion"
-		  "<code>:noweb</code> header argument expansion"
+		'("<code>:noweb</code> header argument expansion"
 		  "message" "expanded1"
 		  "message" "expanded2"
 		  "noweb-1-yes-start"
@@ -99,8 +97,7 @@
 		  "message" "expanded2"
 		  "noweb-tangle-start"
 		  "&lt;&lt;noweb-example1&gt;&gt;"
-		  "&lt;&lt;noweb-example2&gt;&gt;"
-		  "</body>"))))))
+		  "&lt;&lt;noweb-example2&gt;&gt;"))))))
 
 (ert-deftest ob-exp/noweb-on-export-with-exports-results ()
   "Noweb header arguments export correctly using :exports results.
@@ -110,7 +107,7 @@
   (org-test-at-id "8701beb4-13d9-468c-997a-8e63e8b66f8d"
     (org-narrow-to-subtree)
     (let ((exported-html
-	   (org-export-as-html nil nil nil 'string))
+	   (org-export-as-html nil nil nil 'string 'body-only))
 	  (test-point 0))
 
       (org-test-with-temp-text-in-file
@@ -123,9 +120,7 @@
 			      x
 			      nil t)))
 		  (setq test-point (point)))
-		'("<head>" "</head>" "<body>"
-		  "<code>:noweb</code> header argument expansion using :exports results"
-		  "<code>:noweb</code> header argument expansion using :exports results"
+		'("<code>:noweb</code> header argument expansion using :exports results"
 		  "expanded1"
 		  "expanded2"
 		  "expanded1"
@@ -133,8 +128,7 @@
 		  "&lt;&lt;noweb-example1&gt;&gt;"
 		  "expanded2"
 		  "&lt;&lt;noweb-example1&gt;&gt;"
-		  "&lt;&lt;noweb-example2&gt;&gt;"
-		  "</body>"))))))
+		  "&lt;&lt;noweb-example2&gt;&gt;"))))))
 
 (ert-deftest ob-exp/exports-both ()
   "Test the :exports both header argument.
@@ -143,9 +137,8 @@ elements in the final html."
   (org-test-at-id "92518f2a-a46a-4205-a3ab-bcce1008a4bb"
     (org-narrow-to-subtree)
     (let ((exported-html
-	   (org-export-as-html nil nil nil 'string))
+	   (org-export-as-html nil nil nil 'string 'body-only))
 	  (test-point 0))
-
       (org-test-with-temp-text-in-file
 	  exported-html
 
@@ -156,9 +149,7 @@ elements in the final html."
 			      x
 			      nil t)))
 		  (setq test-point (point)))
-		'("<head>" "</head>" "<body>"
-		   "Pascal's Triangle &ndash; exports both test"
-		   "Pascal's Triangle &ndash; exports both test"
+		'( "Pascal's Triangle &ndash; exports both test"
 		   "<pre"
 		   "defun" "pascals-triangle"
 		   "if""list""list""let*""prev-triangle"
@@ -173,14 +164,13 @@ elements in the final html."
 		   "<tr>"">1<"">3<"">3<"">1<""</tr>"
 		   "<tr>"">1<"">4<"">6<"">4<"">1<""</tr>"
 		   "<tr>"">1<"">5<"">10<"">10<"">5<"">1<""</tr>"
-		   "</tbody>""</table>"
-		  "</body>"))))))
+		   "</tbody>""</table>"))))))
 
 (ert-deftest ob-exp/mixed-blocks-with-exports-both ()
     (org-test-at-id "5daa4d03-e3ea-46b7-b093-62c1b7632df3"
     (org-narrow-to-subtree)
     (let ((exported-html
-	   (org-export-as-html nil nil nil 'string))
+	   (org-export-as-html nil nil nil 'string  'body-only))
 	  (test-point 0))
       (org-test-with-temp-text-in-file
 	  exported-html
@@ -192,9 +182,7 @@ elements in the final html."
 			      x
 			      nil t)))
 		  (setq test-point (point)))
-		'("<head>" "</head>" "<body>"
-		  "mixed blocks with exports both"
-		  "mixed blocks with exports both"
+		'("mixed blocks with exports both"
 		  "<ul>"
 		  "<li>""a""</li>"
 		  "<li>""b""</li>"
@@ -205,9 +193,9 @@ elements in the final html."
 		  "</pre>"
 		  "<pre class=\"example\">"
 		  "code block results"
-		  "</pre>"
-		  "</body>"))))))
-
+		  "</pre>"))))))
+      
 (provide 'test-ob-exp)
 
 ;;; test-ob-exp.el ends here
+
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch][babel] Fix latest block export tests to suit Emacs 22
  2012-01-06  8:21 [patch][babel] Fix latest block export tests to suit Emacs 22 Martyn Jago
@ 2012-01-06  8:46 ` Bastien
  2012-01-06 17:17   ` Martyn Jago
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2012-01-06  8:46 UTC (permalink / raw)
  To: Martyn Jago; +Cc: emacs-orgmode

Martyn Jago <martyn.jago@btinternet.com> writes:

> What appears to be a subtle difference in html export detail between
> Emacs 22 and Emacs 23+ breaks these latest tests on Emacs 22.
>
> The attached patch fixes them (and the subtle difference is not relevant
> to these tests).

Applied, thanks!

This commit has also been reported on #org-mode by the (new) CIA-26 
bot, which will report any commit from now on.  

Thanks to Jason for setting this up!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch][babel] Fix latest block export tests to suit Emacs 22
  2012-01-06  8:46 ` Bastien
@ 2012-01-06 17:17   ` Martyn Jago
  0 siblings, 0 replies; 3+ messages in thread
From: Martyn Jago @ 2012-01-06 17:17 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Bastien <bzg@altern.org> writes:

> Martyn Jago <martyn.jago@btinternet.com> writes:
>
>> What appears to be a subtle difference in html export detail between
>> Emacs 22 and Emacs 23+ breaks these latest tests on Emacs 22.
>>
>> The attached patch fixes them (and the subtle difference is not relevant
>> to these tests).
>
> Applied, thanks!
>
> This commit has also been reported on #org-mode by the (new) CIA-26 
> bot, which will report any commit from now on.  
>
> Thanks to Jason for setting this up!

Cool! I'll add it to my twitter feed :)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-06 17:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-06  8:21 [patch][babel] Fix latest block export tests to suit Emacs 22 Martyn Jago
2012-01-06  8:46 ` Bastien
2012-01-06 17:17   ` Martyn Jago

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).