Browse Source

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.
Eric Schulte 8 years ago
parent
commit
f1746a5118
2 changed files with 22 additions and 0 deletions
  1. 14 0
      testing/examples/org-exp.org
  2. 8 0
      testing/lisp/test-org-exp.el

+ 14 - 0
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

+ 8 - 0
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)))))