@testable import PureYAML import Testing @Suite("Single-quoted scalar folding") struct SingleQuotedFoldingTests { @Test("A multi-line single-quoted scalar folds breaks like a double-quoted one") func test_singleQuotedLineFolding() throws { let parsed = try PureYAML.parse("' 1st non-empty\n\n 2nd non-empty \n\t3rd non-empty '") #expect(parsed == .string(" 1st non-empty\n2nd non-empty 3rd non-empty ")) } @Test("A doubled quote escapes to one while real breaks fold") func test_singleQuotedEscapeAndFold() throws { #expect(try PureYAML.parse("'it''s a test\n folded line'") == .string("it's a test folded line")) } @Test("A single-line single-quoted scalar is unchanged") func test_singleQuotedSingleLine() throws { #expect(try PureYAML.parse("'single'") == .string("single")) } }