test-ob-header-arg-defaults.el 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. ;;; test-ob-header-arg-defaults.el --- tests for default header args from properties
  2. ;; Copyright (c) 2013, 2014 Achim Gratz
  3. ;; Authors: Achim Gratz
  4. ;; This file is not part of GNU Emacs.
  5. ;; This program is free software; you can redistribute it and/or modify
  6. ;; it under the terms of the GNU General Public License as published by
  7. ;; the Free Software Foundation, either version 3 of the License, or
  8. ;; (at your option) any later version.
  9. ;; This program is distributed in the hope that it will be useful,
  10. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. ;; GNU General Public License for more details.
  13. ;; You should have received a copy of the GNU General Public License
  14. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. ;;; Code:
  16. (ert-deftest test-ob-header-arg-defaults/global/call ()
  17. (org-test-at-id "3fdadb69-5d15-411e-aad0-f7860cdd7816"
  18. (org-babel-next-src-block 1)
  19. (forward-line -1)
  20. (should (equal "ge1/gh2/go3/ge4/ge5/--6/--7/--8/--9"
  21. (org-babel-lob-execute (org-babel-lob-get-info))))))
  22. (ert-deftest test-ob-header-arg-defaults/global/noweb ()
  23. (org-test-at-id "3fdadb69-5d15-411e-aad0-f7860cdd7816"
  24. (org-babel-next-src-block 1)
  25. (should (equal "ge1/gh2/go3/ge4/ge5/--6/--7"
  26. (org-babel-execute-src-block)))))
  27. (ert-deftest test-ob-header-arg-defaults/tree/overwrite/call ()
  28. (org-test-at-id "a9cdfeda-9f31-4bb5-b694-2cf452f07dfd"
  29. (org-babel-next-src-block 1)
  30. (forward-line -1)
  31. (should (equal "go1/go2/go3/--4/--5/--6/th7/te8/--9"
  32. (org-babel-lob-execute (org-babel-lob-get-info))))))
  33. (ert-deftest test-ob-header-arg-defaults/tree/overwrite/noweb ()
  34. (org-test-at-id "a9cdfeda-9f31-4bb5-b694-2cf452f07dfd"
  35. (org-babel-next-src-block 1)
  36. (should (equal "--1/--2/--3/--4/--5/to6/th7/te8/--9"
  37. (org-babel-execute-src-block)))))
  38. (ert-deftest test-ob-header-arg-defaults/tree/accumulate/call ()
  39. (org-test-at-id "1d97d258-fd50-4107-a095-e4625bffc57b"
  40. (org-babel-next-src-block 1)
  41. (forward-line -1)
  42. (should (equal "ge1/th2/th3/ge4/te5/--6"
  43. (org-babel-lob-execute (org-babel-lob-get-info))))))
  44. (ert-deftest test-ob-header-arg-defaults/tree/accumulate/noweb ()
  45. (org-test-at-id "1d97d258-fd50-4107-a095-e4625bffc57b"
  46. (org-babel-next-src-block 1)
  47. (should (equal "ge1/th2/th3/ge4/te5/to6/--7/--8"
  48. (org-babel-execute-src-block)))))
  49. (ert-deftest test-ob-header-arg-defaults/tree/complex/call ()
  50. (org-test-at-id "fa0e912d-d9b4-47b0-9f9e-1cbb39f7cbc2"
  51. (org-babel-next-src-block 1)
  52. (forward-line -1)
  53. (should (equal "gh1/th2/go3/gh4/te5/--6"
  54. (org-babel-lob-execute (org-babel-lob-get-info))))))
  55. (ert-deftest test-ob-header-arg-defaults/tree/complex/noweb ()
  56. (org-test-at-id "fa0e912d-d9b4-47b0-9f9e-1cbb39f7cbc2"
  57. (org-babel-next-src-block 1)
  58. (should (equal "gh1/th2/--3/gh4/te5/to6/--7/--8/--9"
  59. (org-babel-execute-src-block)))))
  60. (provide 'test-ob-header-arg-defaults)
  61. ;;; test-ob-header-arg-defaults.el ends here