From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Hansen Subject: [PATCH 1/2] test INCLUDE pathname expansion with subdirectories Date: Thu, 24 Sep 2015 18:20:40 -0400 Message-ID: <1443133241-501-1-git-send-email-rhansen@bbn.com> References: <56047142.1060404@bbn.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfEt1-0005Xg-Sf for emacs-orgmode@gnu.org; Thu, 24 Sep 2015 18:21:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfEsx-00033i-OB for emacs-orgmode@gnu.org; Thu, 24 Sep 2015 18:21:07 -0400 Received: from smtp.bbn.com ([128.33.0.80]:22897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfEsx-00032y-Kn for emacs-orgmode@gnu.org; Thu, 24 Sep 2015 18:21:03 -0400 In-Reply-To: <56047142.1060404@bbn.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Richard Hansen * lisp/test-ox.el (test-org-export/expand-include): Modify the INCLUDE test to ensure that a.org including subdir/b.org including c.org causes subdir/c.org to be read, not c.org. TINYCHANGE --- testing/examples/include.org | 2 +- testing/examples/{include2.org => include3.org} | 0 testing/examples/subdir/include2.org | 1 + testing/lisp/test-ox.el | 8 ++++---- 4 files changed, 6 insertions(+), 5 deletions(-) rename testing/examples/{include2.org => include3.org} (100%) create mode 100644 testing/examples/subdir/include2.org diff --git a/testing/examples/include.org b/testing/examples/include.org index f4dcc20..7122716 100644 --- a/testing/examples/include.org +++ b/testing/examples/include.org @@ -4,7 +4,7 @@ Small Org file with an include keyword. (+ 2 1) #+END_SRC -#+INCLUDE: "include2.org" +#+INCLUDE: "subdir/include2.org" * Heading body diff --git a/testing/examples/include2.org b/testing/examples/include3.org similarity index 100% rename from testing/examples/include2.org rename to testing/examples/include3.org diff --git a/testing/examples/subdir/include2.org b/testing/examples/subdir/include2.org new file mode 100644 index 0000000..68df86e --- /dev/null +++ b/testing/examples/subdir/include2.org @@ -0,0 +1 @@ +#+INCLUDE: "../include3.org" diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el index ccffa89..1af5c21 100644 --- a/testing/lisp/test-ox.el +++ b/testing/lisp/test-ox.el @@ -925,7 +925,7 @@ text (insert-file (expand-file-name "examples/include.org" org-test-dir)) (replace-regexp-in-string - (regexp-quote "#+INCLUDE: \"include2.org\"") + (regexp-quote "#+INCLUDE: \"subdir/include2.org\"") "Success!" (buffer-string))) (org-test-with-temp-text (format "#+INCLUDE: \"%s/examples/include.org\"" org-test-dir) @@ -992,7 +992,7 @@ text "#+BEGIN_CENTER\nSuccess!\n#+END_CENTER\n" (org-test-with-temp-text (format - "#+INCLUDE: \"%s/examples/include2.org\" CENTER" + "#+INCLUDE: \"%s/examples/include3.org\" CENTER" org-test-dir) (org-export-expand-include-keyword) (buffer-string)))) @@ -1132,11 +1132,11 @@ Footnotes[fn:2], foot[fn:test], digit only[3], and [fn:inline:anonymous footnote (should-not (equal (org-test-with-temp-text - (format "#+INCLUDE: \"%s/examples/include2.org\" src emacs-lisp" org-test-dir) + (format "#+INCLUDE: \"%s/examples/include3.org\" src emacs-lisp" org-test-dir) (org-export-expand-include-keyword) (buffer-string)) (org-test-with-temp-text - (format "#+INCLUDE: \"%s/examples/include2.org\" src emacs-lisp :minlevel 1" org-test-dir) + (format "#+INCLUDE: \"%s/examples/include3.org\" src emacs-lisp :minlevel 1" org-test-dir) (org-export-expand-include-keyword) (buffer-string)))) ;; INCLUDE assigns the relative :minlevel conditional on narrowing. -- 2.5.3