pkgs-lib: Make tests independent of Nix file contents

Before, all of these tests would be rebuilt whenever formats.nix is
modified, but there's no need for this :)

Changed files
+6 -6
pkgs
pkgs-lib
+6 -6
pkgs/pkgs-lib/tests/formats.nix
···
str = "foo";
attrs.foo = null;
list = [ null null ];
-
path = ./formats.nix;
+
path = ./testfile;
};
expected = ''
{
···
null
],
"null": null,
-
"path": "${./formats.nix}",
+
"path": "${./testfile}",
"str": "foo",
"true": true
}
···
str = "foo";
attrs.foo = null;
list = [ null null ];
-
path = ./formats.nix;
+
path = ./testfile;
no = "no";
time = "22:30:00";
};
···
- null
'no': 'no'
'null': null
-
path: ${./formats.nix}
+
path: ${./testfile}
str: foo
time: '22:30:00'
'true': true
···
1
null
];
-
path = ./formats.nix;
+
path = ./testfile;
};
expected = ''
attrs {
···
null
]
"null": null
-
"path": "${./formats.nix}"
+
"path": "${./testfile}"
"str": "foo"
"true": true
'';
pkgs/pkgs-lib/tests/testfile

This is a binary file and will not be displayed.