import Foundation import Testing @testable import OrgCore /// reveal.js export against the structure org-re-reveal writes; Emacs's org-re-reveal isn't /// installed for an oracle test. struct RevealExportTests { static let library = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent() .appendingPathComponent("Sources/OrgMathJax/Reveal") static let deck = """ #+TITLE: Talk #+AUTHOR: Ann #+DATE: 2026-11-26 #+OPTIONS: toc:nil num:nil * First Intro text. #+BEGIN_NOTES Say hello. #+END_NOTES ** Down #+ATTR_REVEAL: :frag (appear) - one - two * Second #+ATTR_REVEAL: :frag fade-in :frag_idx 2 A fragment. *** Deep Still on Second's group. """ /// The slides alone, between the slides div and its end, without the title slide. static func slides(_ html: String) -> String { let start = html.range(of: "
\n\n", options: .backwards)!.lowerBound return String(html[start..Intro text.
A fragment.
Still on Second's group.