-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
50 additions
and
5 deletions.
There are no files selected for viewing
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
File renamed without changes.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,37 @@ | ||
{-# LANGUAGE QuasiQuotes #-} | ||
module Confer.EvaluatorTest where | ||
|
||
import Data.Function | ||
import Control.Monad | ||
import Data.Vector qualified as Vector | ||
import Data.List.NonEmpty qualified as NE | ||
import Effectful | ||
import Effectful.Error.Static (Error) | ||
import Effectful.Error.Static qualified as Error | ||
import Effectful.FileSystem (FileSystem) | ||
Check warning on line 11 in test/Confer/EvaluatorTest.hs
|
||
import Effectful.FileSystem qualified as FileSystem | ||
import System.FilePath qualified as FilePath | ||
import System.IO.Temp qualified as Temporary | ||
import System.OsPath | ||
import System.OsPath qualified as OsPath | ||
import Test.Tasty (TestTree) | ||
import Effectful.FileSystem | ||
import Test.Tasty.HUnit () | ||
|
||
import Confer.Config.Evaluator | ||
import Utils | ||
|
||
spec :: TestEff TestTree | ||
spec = | ||
testThese | ||
"Evaluator Checks" | ||
[ testThis "Empty configuration" testEmptyConfigurationoError | ||
] | ||
|
||
testEmptyConfigurationoError :: TestEff () | ||
testEmptyConfigurationoError = do | ||
Temporary.withSystemTempDirectory "empty-config.ext" $ \directory -> do | ||
copyFile "./test/fixtures/empty-config.lua" (directory <> "/empty-config.lua") | ||
filepath <- liftIO $ encodeUtf $ directory <> "/empty-config.lua" | ||
result <- assertRight =<< loadConfiguration False filepath | ||
assertEqual result Vector.empty |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return {} |