import Foundation import OrgCore import Testing @testable import OrgPresentation struct ShrunkColumnsTests { static let table = "| <3> | b |\n|------+---|\n| abcdef | x |\n" @Test func startupShrinksCookieColumnsOnlyWithTheWord() { let plain = OrgParser.parse("intro\n" + Self.table) #expect(ShrunkColumns.startup(plain).isEmpty) let tree = OrgParser.parse("#+STARTUP: shrink\n" + Self.table + "\n| a | b |\n") let shrunk = ShrunkColumns.startup(tree) let start = ("#+STARTUP: shrink\n" as NSString).length #expect(Array(shrunk.tables.keys) == [start]) #expect(shrunk.columns(in: start..