#+TITLE: Header tests #+PROPERTY: header-args :tangle /tmp/default_tangle.txt The text contents in each block are tested against the output of =(assoc (nth 2 (org-babel-get-src-block-info)))= Multiple header properties can be tested by separating each property output with a **newline followed by exactly two spaces**. * Inherit tangle header from document :PROPERTIES: :ID: a41c3238-f457-4769-b10b-8d50e9d386a1 :END: #+begin_src conf (:tangle . /tmp/default_tangle.txt) #+end_src * Inherit tangle header but use local sync action :PROPERTIES: :ID: debf7bf8-e5eb-412d-9127-57950a27c390 :END: #+begin_src conf :tangle skip (:tangle . /tmp/default_tangle.txt skip) #+end_src * Use local tangle file and sync action :PROPERTIES: :ID: 1ca658c1-0dfd-42a5-bbe3-305582deeb00 :END: + Ignore document header completely. #+begin_src conf :tangle randomfile sync (:tangle . randomfile sync) #+end_src * Use local tangle file and sync action 2 :PROPERTIES: :header-args: :tangle "newfile.txt" import :END: ** Subheading :PROPERTIES: :ID: 602503b8-6657-49c6-9cac-7edac396f725 :END: + Ignore document header and parent header completely. #+begin_src conf :tangle randomfile sync (:tangle . randomfile sync) #+end_src * Test tangle and results param together :PROPERTIES: :ID: 4fb9938c-aec0-479f-bbc6-6b7a4228d9c2 :END: #+begin_src conf :tangle randomfile (:tangle . randomfile) (:results . replace) #+end_src * Inherit the tangle file name, take the last sync action :PROPERTIES: :ID: 7a98b56d-e59f-426d-bd58-f93bb22cf57b :END: + Ignores import #+begin_src conf :tangle import export (:tangle . /tmp/default_tangle.txt export) #+end_src * Take the last local tangle file name and the last sync action :PROPERTIES: :ID: cd85e03a-1a4c-45d5-ac33-90d96999b665 :END: + Ignores fname1 and sync #+begin_src conf :tangle fname1 fname2 sync export (:tangle . fname2 export) #+end_src * Merge document results param and local results param :PROPERTIES: :ID: f4e4e422-029b-4ef7-b594-cd70cff2d943 :END: #+begin_src sh :results file wrap (:results . wrap file replace) (:exports . code) #+end_src * All tangle headers should be ignored (ITS FAILING HERE) :PROPERTIES: :ID: 9715d355-009c-4188-8b97-bcbebaeee86f :END: #+begin_src conf :tangle no (:tangle . no) #+end_src * Tangle filename ignores document and heading args, inherits heading exports :PROPERTIES: :ID: 1a3b5565-27b5-450e-a2c5-7f95a8142f3b :header-args: :tangle no :exports verbatim :END: #+begin_src conf :tangle "foo.txt" :comments link (:tangle . foo.txt) (:exports . verbatim code) (:comments . link) #+end_src * Heading tangle parameter is not overwritten by local "yes" :PROPERTIES: :ID: fe54b2be-d9f1-40b4-83df-49501e69d083 :header-args: :tangle "foo.txt" :END: #+begin_src :tangle yes (:tangle . foo.txt) #+end_src ** Local tangle filename with spaces overwrites parent foo.txt :PROPERTIES: :ID: ab8af294-c586-4ec8-9f45-3c3baaeb184d :END: + The expected hierarchy is =/tmp/default_tangle.txt= is supplanted by =foo.txt= which is supplanted by =file with spaces.txt= #+begin_src :tangle "file with spaces.txt" (:tangle . "file with spaces.txt") #+end_src