1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-20 01:59:45 +01:00

lib.gvariant: add a few more functions to test case

This commit is contained in:
Robert Helgesson 2021-08-13 00:40:58 +02:00
parent d819e0741a
commit a3d691c053
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -15,8 +15,23 @@ in {
{ float = 3.14; } { float = 3.14; }
{ int = 42; } { int = -42; }
{ int = 42; } { int = -42; }
{ uint32 = mkUint32 42; }
{ uint32 = mkUint32 42; }
{ int16 = mkInt16 (-42); }
{ int16 = mkInt16 (-42); }
{ uint16 = mkUint16 42; }
{ uint16 = mkUint16 42; }
{ int64 = mkInt64 (-42); }
{ int64 = mkInt64 (-42); }
{ uint64 = mkUint64 42; }
{ uint64 = mkUint64 42; }
{ list = [ "one" ]; } { list = [ "one" ]; }
{ list = mkArray type.string [ "two" ]; } { list = mkArray type.string [ "two" ]; }
@ -53,12 +68,17 @@ in {
emptyArray2 = @as [] emptyArray2 = @as []
escapedString = '\'\\\n' escapedString = '\'\\\n'
float = 3.140000 float = 3.140000
int = 42 int = -42
int16 = @n -42
int64 = @x -42
list = @as ['one','two'] list = @as ['one','two']
maybe1 = @ms nothing maybe1 = @ms nothing
maybe2 = just @u 4 maybe2 = just @u 4
string = 'foo' string = 'foo'
tuple = @(ias) (1,@as ['foo']) tuple = @(ias) (1,@as ['foo'])
uint16 = @q 42
uint32 = @u 42
uint64 = @t 42
'' ''
} }
''; '';