diff --git a/examples/testy/.gitignore b/examples/testy/.gitignore deleted file mode 100644 index 2784b39..0000000 --- a/examples/testy/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build/ -*.*~ diff --git a/examples/testy/pack.toml b/examples/testy/pack.toml deleted file mode 100644 index ae5f38f..0000000 --- a/examples/testy/pack.toml +++ /dev/null @@ -1,10 +0,0 @@ -[custom.all.testy] -type = "local" -path = "." -ipkg = "testy.ipkg" -test = "test/test.ipkg" - -[custom.all.testy-test] -type = "local" -path = "test" -ipkg = "test.ipkg" \ No newline at end of file diff --git a/examples/testy/src/Testy.idr b/examples/testy/src/Testy.idr deleted file mode 100644 index 54de3c2..0000000 --- a/examples/testy/src/Testy.idr +++ /dev/null @@ -1,11 +0,0 @@ -module Testy - -import System -import Data.String - --- @@test Hello World non-null -helloNonNull : IO () -helloNonNull = - if null "Hello World" - then exitFailure - else exitSuccess diff --git a/examples/testy/test/src/Main.idr b/examples/testy/test/src/Main.idr deleted file mode 100644 index 8d2910f..0000000 --- a/examples/testy/test/src/Main.idr +++ /dev/null @@ -1,19 +0,0 @@ -module Main - -import System - --- @@test Main Test -main : IO () -main = putStrLn "Test successful!" - --- @@test Failing integration with error message -ohNo : IO () -ohNo = do - putStrLn "Something horrible has happened" - exitFailure - --- @@test Passing integration with output -ohYes : IO () -ohYes = do - putStrLn "Something amazing has happened" - exitSuccess diff --git a/examples/testy/test/src/TestModule/Booleans.idr b/examples/testy/test/src/TestModule/Booleans.idr deleted file mode 100644 index 8fbc4a0..0000000 --- a/examples/testy/test/src/TestModule/Booleans.idr +++ /dev/null @@ -1,11 +0,0 @@ -module TestModule.Booleans - -import System - --- @@test Boolean Integration passes -doesWork : IO Bool -doesWork = pure True - --- @@test Boolean Integration fails -dontWork : IO Bool -dontWork = pure False diff --git a/examples/testy/test/test.ipkg b/examples/testy/test/test.ipkg deleted file mode 100644 index dadcbeb..0000000 --- a/examples/testy/test/test.ipkg +++ /dev/null @@ -1,48 +0,0 @@ -package testytest -version = 0.1.0 -authors = "Nathan McCarty" --- maintainers = --- license = --- brief = --- readme = --- homepage = --- sourceloc = --- bugtracker = - --- the Idris2 version required (e.g. langversion >= 0.5.1) --- langversion - --- packages to add to search path -depends = testy - --- modules to install -modules = Main - , TestModule.Booleans - --- main file (i.e. file to load at REPL) -main = Main - --- name of executable -executable = "testy-test" --- opts = -sourcedir = "src" --- builddir = --- outputdir = - --- script to run before building --- prebuild = - --- script to run after building --- postbuild = - --- script to run after building, before installing --- preinstall = - --- script to run after installing --- postinstall = - --- script to run before cleaning --- preclean = - --- script to run after cleaning --- postclean = diff --git a/examples/testy/testy.ipkg b/examples/testy/testy.ipkg deleted file mode 100644 index fa5f6a8..0000000 --- a/examples/testy/testy.ipkg +++ /dev/null @@ -1,47 +0,0 @@ -package testy -version = 0.1.0 -authors = "Nathan McCarty" --- maintainers = --- license = --- brief = --- readme = --- homepage = --- sourceloc = --- bugtracker = - --- the Idris2 version required (e.g. langversion >= 0.5.1) --- langversion - --- packages to add to search path --- depends = - --- modules to install -modules = Testy - --- main file (i.e. file to load at REPL) --- main = - --- name of executable --- executable = --- opts = -sourcedir = "src" --- builddir = --- outputdir = - --- script to run before building --- prebuild = - --- script to run after building --- postbuild = - --- script to run after building, before installing --- preinstall = - --- script to run after installing --- postinstall = - --- script to run before cleaning --- preclean = - --- script to run after cleaning --- postclean = diff --git a/lib/IUtils/Compiler.rakumod b/lib/IUtils/Compiler.rakumod index 14cb559..6aad5de 100644 --- a/lib/IUtils/Compiler.rakumod +++ b/lib/IUtils/Compiler.rakumod @@ -51,8 +51,6 @@ class IdrisError is Exception { qq:to/END/; Error running idris command: $.command Command exited with $.exit-code - StdOut: - {$.out.lines.map(*.indent: 2).join("\n")} END } } @@ -77,7 +75,7 @@ sub idris-run(*@cmd) is export { my $proc = run "idris2", @cmd, :out, :err; my $out = $proc.out.slurp(:close); my $err = $proc.err.slurp(:close); - if !$proc || $out.contains("Error:") { + unless $proc { IdrisError.new( out => $out, err => $err, exit-code => $proc.exitcode, command => @cmd.Str) @@ -119,7 +117,5 @@ sub idris-exec($expr, $file, $output-type? = Unit) is export { exit-code => $proc.exitcode, expr => $expr ).throw; } - # Remove the output file - 'build/exec/iutils_out'.IO.unlink; return $out; }