On Tue, Jan 19, 2021 at 08:45:22PM +0100, mitch--- via General discussions 
about Org-mode. wrote:

> I have created a minimal test using the ox-ascii backend that shows
> the same behaviour in Org core.

Which is attached here because it forget it in the original mail.

Sorry
Christian

PS: My "From:" always gets "via General discussions about Org-mode."
appended.  Where does this come from?  I'm subscribed to this list
with same the address I use in my From: line.
-- 
....Christian.Garbs....................................https://www.cgarbs.de

It looked so easy.
>From 93ff5348898eb68144dbc3cf602ed7fed7d212a3 Mon Sep 17 00:00:00 2001
From: Christian Garbs <mi...@cgarbs.de>
Date: Tue, 19 Jan 2021 20:07:11 +0100
Subject: [PATCH] testing/lisp/test-ox-ascii.el: Test fixed-width export in
 ox-ascii

* testing/lisp/test-ox-ascii.el: Add test of fixed-width export in
ox-ascii exporter to ensure that no extra newlines are exported after
a fixed-width block.
---
 testing/lisp/test-ox-ascii.el | 55 +++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 testing/lisp/test-ox-ascii.el

diff --git a/testing/lisp/test-ox-ascii.el b/testing/lisp/test-ox-ascii.el
new file mode 100644
index 000000000..aee2ee879
--- /dev/null
+++ b/testing/lisp/test-ox-ascii.el
@@ -0,0 +1,55 @@
+;;; test-ox-ascii.el --- Tests for ox-ascii.el -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2021  Christian Garbs
+
+;; Author: Christian Garbs <mi...@cgarbs.de>
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'ox-ascii)
+
+(defun test-org-ascii-export (input)
+  "Transform INPUT to Ascii and return the result."
+  (org-test-with-temp-text input
+			   (org-ascii-export-as-ascii)
+			   (with-current-buffer "*Org ASCII Export*"
+			     (buffer-substring-no-properties (point-min) (point-max)))))
+
+(ert-deftest test-org-ascii/export-fixed-width ()
+  (should (equal (test-org-ascii-export "#+AUTHOR: xyzzy
+#+OPTIONS: toc:nil
+paragraph 1
+
+: verbatim line
+:   indented verbatim line
+
+paragraph 2")
+		 "xyzzy
+
+
+paragraph 1
+
+,----
+| verbatim line
+|   indented verbatim line
+`----
+
+paragraph 2
+")))
+
+(provide 'test-ox-ascii)
+
+;;; test-ox-ascii.el ends here
-- 
2.20.1

Reply via email to