mirror of https://git.jolheiser.com/ffdhall.git
parent
1bcb2c430f
commit
7e369588fa
|
@ -1,7 +1,6 @@
|
|||
package ffdhall
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
@ -30,6 +29,12 @@ func TestDhallParser(t *testing.T) {
|
|||
file: "testdata/basic.dhall",
|
||||
want: fftest.Vars{S: "s", I: 10, B: true, D: 5 * time.Second},
|
||||
},
|
||||
{
|
||||
name: "typed KV pairs",
|
||||
args: []string{},
|
||||
file: "testdata/typed.dhall",
|
||||
want: fftest.Vars{S: "s", I: 10, B: true, D: 5 * time.Second},
|
||||
},
|
||||
{
|
||||
name: "value arrays",
|
||||
args: []string{},
|
||||
|
@ -49,7 +54,6 @@ func TestDhallParser(t *testing.T) {
|
|||
ff.WithConfigFile(testcase.file),
|
||||
ff.WithConfigFileParser(DhallParser),
|
||||
)
|
||||
fmt.Println(vars.ParseError)
|
||||
fftest.Compare(t, &testcase.want, vars)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
let Test = { s : Text, i : Natural, b : Bool, d : Text }
|
||||
|
||||
in { s = "s", i = 10, b = True, d = "5s" } : Test
|
|
@ -1,5 +1,5 @@
|
|||
{ s = [ "a", "bb" ]
|
||||
, i = [ "10", "11", "12" ]
|
||||
, i = [ 10, 11, 12 ]
|
||||
, b = [ False, True ]
|
||||
, d = [ "10m", "5s" ]
|
||||
, x = [ "a", "B", "👍" ]
|
||||
|
|
Loading…
Reference in New Issue