mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-05 19:57:31 +00:00
41 lines
977 B
Swift
41 lines
977 B
Swift
//
|
|
// ScriptingTests.swift
|
|
// NetNewsWireTests
|
|
//
|
|
// Created by Olof Hellman on 1/7/18.
|
|
// Copyright © 2018 Olof Hellman. All rights reserved.
|
|
//
|
|
|
|
import Testing
|
|
|
|
@MainActor struct ScriptingTests {
|
|
|
|
// An example of how a script can be run as part of a test.
|
|
// The script returns {test_result:true, script_result:"Geoducks!"}.
|
|
// runTestScript verifies test_result. This test verifies script_result.
|
|
@Test func genericScript() {
|
|
let scriptResult = runTestScript(named: "testGenericScript")
|
|
#expect(scriptResult?.stringValue == "Geoducks!")
|
|
}
|
|
|
|
@Test func getURLScript() {
|
|
runTestScript(named: "testGetURL")
|
|
}
|
|
|
|
@Test func nameAndURLOfEveryFeedScript() {
|
|
runTestScript(named: "testNameAndUrlOfEveryFeed")
|
|
}
|
|
|
|
@Test func nameOfEveryFolderScript() {
|
|
runTestScript(named: "testNameOfEveryFolder")
|
|
}
|
|
|
|
@Test func nameOfAuthorsScript() {
|
|
runTestScript(named: "testNameOfAuthors")
|
|
}
|
|
|
|
@Test func feedExists() {
|
|
runTestScript(named: "testFeedExists")
|
|
}
|
|
}
|