emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
blob 40cc877d83c9668b88a878d26df3c070341c8c57 2119 bytes (raw)
name: testing/lisp/test-ob-table.el 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
 
;;; test-ob-table.el

;; Copyright (c) 2011-2014 Eric Schulte
;; Authors: Eric Schulte

;; This file is not part of GNU Emacs.

;; 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/>.

;;; Comments:

;; Template test file for Org tests

;;; Code:

;; TODO Test Broken (wrong-type-argument number-or-marker-p "2.0")
;; (ert-deftest test-ob-table/sbe ()
;;   "Test that `sbe' can be used to call code blocks from inside tables."
;;   (org-test-at-id "6d2ff4ce-4489-4e2a-9c65-e3f71f77d975"
;;     (should (= 2 (sbe take-sqrt (n "4"))))))

(ert-deftest test-ob-table/sbe-quote ()
  "Test that `org-sbe' can correctly handle string arguments containing quotes."
  (org-test-with-temp-text-in-file "
#+name: identity
#+begin_src emacs-lisp :eval yes
  x
#+end_src"
    (should (equal "a\"b\"c"
		   (eval '(org-sbe identity (x $ "a\"b\"c")))))))

(ert-deftest test-ob-table/sbe-list ()
  "Test that `org-sbe' can correctly handle list arguments."
  (org-test-with-temp-text-in-file "
#+name: concat
#+begin_src emacs-lisp :eval yes
  (mapconcat #'identity x \"\")
#+end_src"
    (should (equal "foobar"
		   (eval '(org-sbe concat (x '("foo" "bar"))))))))

(ert-deftest test-ob-table/sbe-$-list ()
  "Test that `org-sbe' can correctly handle $-prefixed list arguments."
  (org-test-with-temp-text-in-file "
#+name: concat
#+begin_src emacs-lisp :eval yes
  (mapconcat #'identity x \"\")
#+end_src"
    (should (equal "foobar"
		   (eval '(org-sbe concat (x $ '("foo" "bar"))))))))

(provide 'test-ob-table)

;;; test-ob-table.el ends here

debug log:

solving 40cc877d8 ...
found 40cc877d8 in https://list.orgmode.org/orgmode/20180307225847.24068-3-git@thecybershadow.net/
found 725cf6bdd in https://list.orgmode.org/orgmode/20180307225847.24068-2-git@thecybershadow.net/
found da136cbee in https://git.savannah.gnu.org/cgit/emacs/org-mode.git
preparing index
index prepared:
100644 da136cbeecc42f1908758163b09a48df700fc779	testing/lisp/test-ob-table.el

applying [1/2] https://list.orgmode.org/orgmode/20180307225847.24068-2-git@thecybershadow.net/
diff --git a/testing/lisp/test-ob-table.el b/testing/lisp/test-ob-table.el
index da136cbee..725cf6bdd 100644


applying [2/2] https://list.orgmode.org/orgmode/20180307225847.24068-3-git@thecybershadow.net/
diff --git a/testing/lisp/test-ob-table.el b/testing/lisp/test-ob-table.el
index 725cf6bdd..40cc877d8 100644

Checking patch testing/lisp/test-ob-table.el...
Applied patch testing/lisp/test-ob-table.el cleanly.
Checking patch testing/lisp/test-ob-table.el...
Applied patch testing/lisp/test-ob-table.el cleanly.

index at:
100644 40cc877d83c9668b88a878d26df3c070341c8c57	testing/lisp/test-ob-table.el

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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).