Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,38 @@
; assert.ahk
;; assert(a, b, test=2)
assert(a, b="blank", test=0)
{
if (b = "blank")
{
if !a
msgbox % "blank value"
return 0
}
if equal_list(a, b, "`n")
return 0
else
msgbox % test . ":`n" . a . "`nexpected:`n" . b
}
!r::reload
;; equal_list(a, b, delimiter)
equal_list(a, b, delimiter)
{
loop, parse, b, %delimiter%
{
if instr(a, A_LoopField)
continue
else
return 0
}
loop, parse, a, %delimiter%
{
if instr(b, A_LoopField)
continue
else
return 0
}
return 1
}

View file

@ -0,0 +1,21 @@
assert(isPalindrome("in girum imus nocte et consumimur igni"), 1
, "palindrome test")
assert(broken("in girum imus nocte et consumimur igni"), "works"
, "broken test")
/*
output:
---------------------------
testPalindrome.ahk
---------------------------
broken test:
broken
expected:
works
*/
broken(x){
return "broken"
}
#Include assert.ahk
#Include palindrome.ahk