mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-24 20:23:11 +03:00
New test for detecting overridable options for IPKG commands.
This commit is contained in:
parent
c23958bf16
commit
68a4ad2e1c
@ -79,7 +79,7 @@ idrisTests
|
||||
"perror001", "perror002", "perror003", "perror004", "perror005",
|
||||
"perror006",
|
||||
-- Packages and ipkg files
|
||||
"pkg001", "pkg002",
|
||||
"pkg001", "pkg002", "pkg003",
|
||||
-- Larger programs arising from real usage. Typically things with
|
||||
-- interesting interactions between features
|
||||
"real001", "real002",
|
||||
@ -205,7 +205,7 @@ runTest opts testPath
|
||||
b <- getAnswer
|
||||
when b $ do Right _ <- writeFile "expected" out
|
||||
| Left err => print err
|
||||
pure ()
|
||||
pure ()
|
||||
runTest' : IO Bool
|
||||
runTest'
|
||||
= do putStr $ testPath ++ ": "
|
||||
@ -220,9 +220,9 @@ runTest opts testPath
|
||||
else print FileNotFound
|
||||
pure False
|
||||
| Left err => do print err
|
||||
pure False
|
||||
pure False
|
||||
let result = normalize out == normalize exp
|
||||
if normalize out == normalize exp
|
||||
if normalize out == normalize exp
|
||||
then putStrLn "success"
|
||||
else do
|
||||
putStrLn "FAILURE"
|
||||
|
4
tests/idris2/pkg003/Main.idr
Normal file
4
tests/idris2/pkg003/Main.idr
Normal file
@ -0,0 +1,4 @@
|
||||
module Main
|
||||
|
||||
main : IO ()
|
||||
main = putStrLn "CouCou!"
|
16
tests/idris2/pkg003/expected
Normal file
16
tests/idris2/pkg003/expected
Normal file
@ -0,0 +1,16 @@
|
||||
1/1: Building Main (Main.idr)
|
||||
Not all command line options can be used to override package options.
|
||||
|
||||
Overridable options are:
|
||||
--quiet
|
||||
--verbose
|
||||
--timing
|
||||
--dumpcases <file>
|
||||
--dumplifted <file>
|
||||
--dumpvmcode <file>
|
||||
--debug-elab-check
|
||||
|
||||
|
||||
Packages must have an '.ipkg' extension: "malformed-package-name".
|
||||
The presented iPKG file does not exist: "non-existent-package.ipkg".
|
||||
The presented iPKG file does not exist: "non-existent-package".
|
11
tests/idris2/pkg003/run
Executable file
11
tests/idris2/pkg003/run
Executable file
@ -0,0 +1,11 @@
|
||||
$1 --build testpkg.ipkg
|
||||
rm -f build/
|
||||
$1 --build testpkg.ipkg --quiet
|
||||
$1 --build testpkg.ipkg --verbose
|
||||
$1 --build testpkg.ipkg --timing
|
||||
$1 --build testpkg.ipkg --codegen gambit
|
||||
$1 --build testpkg.ipkg --ide-mode
|
||||
$1 --build malformed-package-name
|
||||
$1 --build non-existent-package.ipkg
|
||||
$1 --build non-existent-package-with-malformed-name
|
||||
rm -f build/
|
11
tests/idris2/pkg003/testpkg.ipkg
Normal file
11
tests/idris2/pkg003/testpkg.ipkg
Normal file
@ -0,0 +1,11 @@
|
||||
package testpkg
|
||||
|
||||
authors = "Joe Bloggs"
|
||||
maintainers = "Joe Bloggs"
|
||||
license = "BSD3 but see LICENSE for more information"
|
||||
brief = "This is a dummy package."
|
||||
readme = "README.md"
|
||||
|
||||
main = Main
|
||||
|
||||
modules = Main
|
Loading…
Reference in New Issue
Block a user