Skip to content

Commit

Permalink
test: basic module test to resist breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
nrdxp committed Aug 2, 2024
1 parent 3f699df commit b5bf8de
Show file tree
Hide file tree
Showing 24 changed files with 160 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/bld.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import ../. ./bld
47 changes: 47 additions & 0 deletions test/bld.res.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
bar = 3;
baz = 7;
buzz = {
bar = 3;
baz = 7;
foo = 1;
fuzz = {
bar = 5;
baz = 9;
foo = 1;
next = {
g = 5;
h = 8;
};
wuzz = {
bar = 7;
baz = 11;
cuzz = {
bar = 3;
baz = 7;
foo = 1;
next = {
g = 5;
h = 8;
};
};
foo = 1;
next = {
g = 5;
h = 8;
};
};
};
next = {
g = 5;
h = 8;
};
};
foo = 1;
next = {
g = 5;
h = 8;
};
test = scopedImport {std = builtins;} "${../std/set/filterMap.nix}";
x = builtins.readFile ./bld/bum;
}
9 changes: 9 additions & 0 deletions test/bld.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
comp="$(nix eval -f ./bld.nix)"
res="$(nix eval -f ./bld.res.nix)"


if [[ "$comp" == "$res" ]]; then
echo "success" && exit 0
fi
echo "failed" && exit 1
5 changes: 5 additions & 0 deletions test/bld/bar/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
foo = 1;
bar = atom.foo + 2;
baz = self.bar + 4;
}
5 changes: 5 additions & 0 deletions test/bld/bar/next/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{

g = super.foo + 4;
h = self.g + 3;
}
1 change: 1 addition & 0 deletions test/bld/bum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello
5 changes: 5 additions & 0 deletions test/bld/buzz/bar/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
foo = 1;
bar = atom.foo + 2;
baz = self.bar + 4;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/bar/next/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{

g = super.foo + 4;
h = self.g + 3;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/fuzz/bar/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
foo = 1;
bar = atom.foo + 2;
baz = self.bar + 4;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/fuzz/bar/next/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{

g = super.foo + 4;
h = self.g + 3;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/fuzz/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
foo = 1;
bar = super.bar + 2;
baz = self.bar + 4;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/fuzz/next/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{

g = super.foo + 4;
h = self.g + 3;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/fuzz/wuzz/bar/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
foo = 1;
bar = atom.foo + 2;
baz = self.bar + 4;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/fuzz/wuzz/bar/next/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{

g = super.foo + 4;
h = self.g + 3;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/fuzz/wuzz/cuzz/bar/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
foo = 1;
bar = atom.foo + 2;
baz = self.bar + 4;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/fuzz/wuzz/cuzz/bar/next/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{

g = super.foo + 4;
h = self.g + 3;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/fuzz/wuzz/cuzz/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
foo = 1;
bar = atom.foo + 2;
baz = self.bar + 4;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/fuzz/wuzz/cuzz/next/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{

g = super.foo + 4;
h = self.g + 3;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/fuzz/wuzz/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
foo = 1;
bar = super.bar + 2;
baz = self.bar + 4;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/fuzz/wuzz/next/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{

g = super.foo + 4;
h = self.g + 3;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
foo = 1;
bar = super.foo + 2;
baz = self.bar + 4;
}
5 changes: 5 additions & 0 deletions test/bld/buzz/next/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{

g = super.foo + 4;
h = self.g + 3;
}
7 changes: 7 additions & 0 deletions test/bld/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
foo = 1;
bar = atom.foo + 2;
baz = self.bar + 4;
test = std.set.filterMap;
x = builtins.readFile "${self}/bum";
}
5 changes: 5 additions & 0 deletions test/bld/next/mod.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{

g = super.foo + 4;
h = self.g + 3;
}

0 comments on commit b5bf8de

Please sign in to comment.