This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val ktor_version: String by project | |
val kotlin_version: String by project | |
val logback_version: String by project | |
plugins { | |
application | |
kotlin("jvm") version "1.7.20" | |
id("io.ktor.plugin") version "2.1.2" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
s = "12345678901234567890" | |
writeDump([ | |
"s" = s, | |
"val(s)" = val(s), | |
"s.getClass().getName()" = s.getClass().getName(), | |
"val(s).getClass().getName()" = val(s).getClass().getName() | |
]) | |
d = 12345678901234567890 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function index( event, rc, prc ){ | |
prc.pageTitle = "Reset Password"; | |
if( isEmpty( rc?.user ) || isEmpty( rc?.token ) ) { | |
return event.setView( "resetpassword/malformedurl" ); | |
} | |
var rows = getInstance( "User" ).firstWhere( "id", rc.user ); | |
if( isNull( rows ) ) { | |
return event.setView( "resetpassword/malformedurl" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
void function run() { | |
describe("Tests of it", () => { | |
it("prefixes its message with ""It""", () => { | |
savecontent variable="message" { | |
it("IS A TEST MESSAGE", () => {}) | |
} | |
tinyTest.results.pass-- | |
expect(message).toInclude("It IS A TEST MESSAGE") | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
cfhttp( | |
method = "get", | |
url = "https://gist.githubusercontent.com/adamcameron/816ce84fd991c2682df612dbaf1cad11/raw/tinyTestFramework.cfm", | |
result = "frameworkCodeResponse", | |
throwOnError = true | |
); | |
frameworkCode = frameworkCodeResponse.fileContent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
void function run() { | |
describe("Tests of toBe", () => { | |
it("passes if the actual and expected values are equal", () => { | |
var actual = "TEST_VALUE" | |
var expected = "TEST_VALUE" | |
result = expect(actual).toBe(expected) | |
if (isNull(result) || !result) { | |
throw(type="TinyTest.TestFailedException") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
void function run() { | |
beforeAll(() => { | |
tinyTest.debug.setByBeforeAll = true | |
}) | |
describe("Tests of beforeEach", () => { | |
describe("Tests without beforeEach (top)", () => { | |
result = [] | |
it("was called before any usage of beforeEach", () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract component { | |
function init() { | |
writeOutput("AbstractBase init called<br>") | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// tests | |
void function run() { | |
beforeAll(() => { | |
tinyTest.debug.setByBeforeAll = true | |
}) | |
describe("Tests of TinyTestFramework", () => { | |
describe("Tests of it", () => { | |
it("prefixes its message with ""It""", () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.tinytest {background-color: black; color:white; font-family:monospace} | |
.tinytest div {margin-left: 1em} | |
.tinyTest .pass {color:green;} | |
.tinyTest .fail {color:red;} | |
.tinyTest .error {background-color:red; color:black} | |
</style> | |
<cfscript> | |
tinyTest = { |