splash/Tests/SplashTests/Core/SyntaxHighlighterTestCase.swift
John Sundell c73767a0bc HTMLOutputFormat: Escape < and > characters
This patch makes `HTMLOutputFormat` correctly escape all < and > characters
that occur in source code. Otherwise, a web browser rendering the resulting
HTML will interpret those characters as tags.
2018-08-27 00:14:48 +02:00

23 lines
630 B
Swift

/**
* Splash
* Copyright (c) John Sundell 2018
* MIT license - see LICENSE.md
*/
import Foundation
import XCTest
import Splash
/// Test case used as an abstract base class for all tests relating to
/// syntax highlighting. For all such tests, the Swift grammar is used.
class SyntaxHighlighterTestCase: SplashTestCase {
private(set) var highlighter: SyntaxHighlighter<OutputFormatMock>!
private(set) var builder: OutputBuilderMock!
override func setUp() {
super.setUp()
builder = OutputBuilderMock()
highlighter = SyntaxHighlighter(format: OutputFormatMock(builder: builder))
}
}