mirror of
https://github.com/carp-lang/Carp.git
synced 2024-11-05 04:44:12 +03:00
a873099640
* chore: Moved examples that work more as tests to folder 'test/produces-output' * fix: Corrections to the release script * fix: Correct filename on Windows * fix: Move more files around * fix: Remove check-malloc example * fix: Apparently unicode example does not work * chore: Move nested_lambdas.carp back to examples * chore: Remove .DS_Store files * fix: Bring back unicode test * test: Make sure benchmark compile (had to remove mandelbrot and n-bodies) * fix: Replacement implementation of clock_gettime on Windows * chore: Trigger CI * fix: Define CLOCK_REALTIME Co-authored-by: Erik Svedang <erik@Eriks-iMac.local>
39 lines
1.0 KiB
PowerShell
39 lines
1.0 KiB
PowerShell
# Stops script if there is an error
|
|
Set-StrictMode -Version Latest
|
|
$ErrorActionPreference = "Stop"
|
|
$PSDefaultParameterValues['*:ErrorAction']='Stop'
|
|
|
|
function exitOnError {
|
|
param([scriptblock]$ScriptBlock)
|
|
& @ScriptBlock
|
|
if ($lastexitcode -ne 0) {
|
|
exit $lastexitcode
|
|
}
|
|
}
|
|
|
|
# TODO Add building of examples
|
|
|
|
# Actual tests (using the test suite)
|
|
Get-ChildItem -Filter test/*.carp | ForEach-Object -Process {
|
|
exitOnError {
|
|
echo $_.FullName
|
|
stack exec carp "--" -x --log-memory $_.FullName
|
|
echo ""
|
|
}
|
|
}
|
|
|
|
# TODO Add test for empty project (with and without core)
|
|
|
|
# TODO Add tests for error messages
|
|
|
|
# Just make sure these compile
|
|
exitOnError { stack exec carp "--" ./examples/mutual_recursion.carp -b }
|
|
exitOnError { stack exec carp "--" ./examples/guessing_game.carp -b }
|
|
exitOnError { stack exec carp "--" ./examples/no_core.carp --no-core --no-profile -b }
|
|
exitOnError { stack exec carp "--" ./examples/check_malloc.carp -b }
|
|
|
|
# Generate docs
|
|
exitOnError { stack exec carp "--" ./docs/core/generate_core_docs.carp }
|
|
|
|
echo "ALL TESTS DONE."
|