@@ -494,6 +494,42 @@ func TestParseFile(t *testing.T) {
494494 })
495495}
496496
497+ func TestParseFileCRLF (t * testing.T ) {
498+ tree , err := LoadFile ("example-crlf.toml" )
499+
500+ assertTree (t , tree , err , map [string ]interface {}{
501+ "title" : "TOML Example" ,
502+ "owner" : map [string ]interface {}{
503+ "name" : "Tom Preston-Werner" ,
504+ "organization" : "GitHub" ,
505+ "bio" : "GitHub Cofounder & CEO\n Likes tater tots and beer." ,
506+ "dob" : time .Date (1979 , time .May , 27 , 7 , 32 , 0 , 0 , time .UTC ),
507+ },
508+ "database" : map [string ]interface {}{
509+ "server" : "192.168.1.1" ,
510+ "ports" : []int64 {8001 , 8001 , 8002 },
511+ "connection_max" : 5000 ,
512+ "enabled" : true ,
513+ },
514+ "servers" : map [string ]interface {}{
515+ "alpha" : map [string ]interface {}{
516+ "ip" : "10.0.0.1" ,
517+ "dc" : "eqdc10" ,
518+ },
519+ "beta" : map [string ]interface {}{
520+ "ip" : "10.0.0.2" ,
521+ "dc" : "eqdc10" ,
522+ },
523+ },
524+ "clients" : map [string ]interface {}{
525+ "data" : []interface {}{
526+ []string {"gamma" , "delta" },
527+ []int64 {1 , 2 },
528+ },
529+ },
530+ })
531+ }
532+
497533func TestParseKeyGroupArray (t * testing.T ) {
498534 tree , err := Load ("[[foo.bar]] a = 42\n [[foo.bar]] a = 69" )
499535 assertTree (t , tree , err , map [string ]interface {}{
0 commit comments