From f1746a51185083b9368810d2d013e73332f90301 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Tue, 6 Sep 2011 21:58:51 -0600 Subject: [PATCH] test of comma stripping behavior * testing/examples/org-exp.org: Example file for export tests. * testing/lisp/test-org-exp.el (test-org-exp/stripping-commas): List file for export tests. --- testing/examples/org-exp.org | 14 ++++++++++++++ testing/lisp/test-org-exp.el | 8 ++++++++ 2 files changed, 22 insertions(+) create mode 100644 testing/examples/org-exp.org create mode 100644 testing/lisp/test-org-exp.el diff --git a/testing/examples/org-exp.org b/testing/examples/org-exp.org new file mode 100644 index 000000000..e101335ca --- /dev/null +++ b/testing/examples/org-exp.org @@ -0,0 +1,14 @@ +#+Title: a collection of examples for export tests +#+OPTIONS: ^:nil + +* stripping commas from within blocks on export + :PROPERTIES: + :ID: 76d3a083-67fa-4506-a41d-837cc48158b5 + :END: +The following commas should not be removed. + +#+begin_src r + a <- c(1 + , 2 + , 3) +#+end_src diff --git a/testing/lisp/test-org-exp.el b/testing/lisp/test-org-exp.el new file mode 100644 index 000000000..b7d7387fc --- /dev/null +++ b/testing/lisp/test-org-exp.el @@ -0,0 +1,8 @@ +(ert-deftest test-org-exp/stripping-commas () + "Test the stripping of commas from within blocks during export." + (org-test-at-id "76d3a083-67fa-4506-a41d-837cc48158b5" + ;; don't strip internal commas + (org-narrow-to-subtree) + (should (string-match + ", 2" + (org-export-as-ascii nil nil nil 'string)))))