diff --git a/tests/lib.nix b/tests/lib.nix index 65559f8..3b181cc 100644 --- a/tests/lib.nix +++ b/tests/lib.nix @@ -66,4 +66,24 @@ lib.runTests { (rgxToString "a?" "a" == "a") (rgxToString "hat" "foohatbar" == "hat") ]; + + testSuites = + let + profiles = os.mkProfileAttrs (toString ./profiles); + users = ""; + userProfiles = ""; + suites = { profiles, ... }: { + system.bar = [ profiles.foo ]; + }; + in + { + expr = os.mkSuites { inherit profiles users userProfiles suites; }; + expected = { + system = { + bar = [ profiles.foo.default ]; + allProfiles = [ profiles.foo.default profiles.t.default ]; + allUsers = []; + }; + }; + }; } diff --git a/tests/profiles/foo/default.nix b/tests/profiles/foo/default.nix new file mode 100644 index 0000000..2181e56 --- /dev/null +++ b/tests/profiles/foo/default.nix @@ -0,0 +1,3 @@ +{ + bar = 5; +} diff --git a/tests/profiles/t/default.nix b/tests/profiles/t/default.nix new file mode 100644 index 0000000..e69de29