diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Old.hs | 4 | ||||
-rw-r--r-- | test/org-select-tags.native | 7 | ||||
-rw-r--r-- | test/org-select-tags.org | 17 |
3 files changed, 28 insertions, 0 deletions
diff --git a/test/Tests/Old.hs b/test/Tests/Old.hs index 842e0f656..4a1fbcbf7 100644 --- a/test/Tests/Old.hs +++ b/test/Tests/Old.hs @@ -175,6 +175,10 @@ tests = [ testGroup "markdown" [ test "reader" ["-r", "man", "-w", "native", "-s"] "man-reader.man" "man-reader.native" ] + , testGroup "org" + [ test "reader" ["-r", "org", "-w", "native", "-s"] + "org-select-tags.org" "org-select-tags.native" + ] ] -- makes sure file is fully closed after reading diff --git a/test/org-select-tags.native b/test/org-select-tags.native new file mode 100644 index 000000000..5fbfd92d1 --- /dev/null +++ b/test/org-select-tags.native @@ -0,0 +1,7 @@ +Pandoc (Meta {unMeta = fromList []}) +[Header 1 ("will-appear-because-it-is-the-ancestor-of-something-tagged-yes",[],[]) [Str "Will",Space,Str "appear",Space,Str "because",Space,Str "it",Space,Str "is",Space,Str "the",Space,Str "ancestor",Space,Str "of",Space,Str "something",Space,Str "tagged",Space,Str "\"yes\""] +,Header 2 ("will-appear",[],[]) [Str "Will",Space,Str "appear",Space,Span ("",["tag"],[("tag-name","yes")]) [SmallCaps [Str "yes"]]] +,Header 3 ("will-appear-since-the-entire-subtree-of-something-selected-will-appear",[],[]) [Str "Will",Space,Str "appear",Space,Str "since",Space,Str "the",Space,Str "entire",Space,Str "subtree",Space,Str "of",Space,Str "something",Space,Str "selected",Space,Str "will",Space,Str "appear"] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Para [Str "Will",Space,Str "appear"]]] +,Header 2 ("will-appear-because-it-is-the-ancestor-of-something-listed-in-select-tags",[],[]) [Str "Will",Space,Str "appear",Space,Str "because",Space,Str "it",Space,Str "is",Space,Str "the",Space,Str "ancestor",Space,Str "of",Space,Str "something",Space,Str "listed",Space,Str "in",Space,Str "SELECT-TAGS"]] diff --git a/test/org-select-tags.org b/test/org-select-tags.org new file mode 100644 index 000000000..8f0ebfdbd --- /dev/null +++ b/test/org-select-tags.org @@ -0,0 +1,17 @@ +#+SELECT_TAGS: yes no +#+EXCLUDE_TAGS: no + +In a document containing one or more trees containing a tag +listed in SELECT_TAGS, only those trees and their ancestor nodes will appear; +this text and any other text preceding the first headline +won't appear for such documents. + +* Will appear because it is the ancestor of something tagged "yes" +** Will appear :yes: +*** Will appear since the entire subtree of something selected will appear +**** Will appear +*** Will not appear since this has tagged with something in EXCLUDE-TAGS :no: +** Will not appear since it's not an ancestor of listed in SELECT-TAGS +** Will appear because it is the ancestor of something listed in SELECT-TAGS +*** Will not appear because it has an EXCLUDE-TAG, but since "no" is also listed as a SELECT-TAG, it will force its parent to appear :no: +* Will not appear |