Skip to content

Commit

Permalink
add two tests with non-standard modules
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoine committed Oct 11, 2023
1 parent 06946bc commit 724d97b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/mod.nu
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,24 @@ export def install-module [] {
}
}

export def install-module-with-repo-root [] {
with-nupm-home {
nupm install --path tests/packages/spam_module_repo_root

assert (check-install [modules spam_module_repo_root])
assert (check-install [modules spam_module_repo_root mod.nu])
}
}

export def install-module-with-src-root [] {
with-nupm-home {
nupm install --path tests/packages/spam_module_src_root

assert (check-install [modules spam_module_src_root])
assert (check-install [modules spam_module_src_root mod.nu])
}
}

export def install-custom [] {
with-nupm-home {
nupm install --path tests/packages/spam_custom
Expand Down
3 changes: 3 additions & 0 deletions tests/packages/spam_module_repo_root/mod.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export def main [] {
"Hello world!"
}
6 changes: 6 additions & 0 deletions tests/packages/spam_module_repo_root/package.nuon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
name: spam_module_repo_root,
type: module,
version: "0.1.0"
root: "./"
}
6 changes: 6 additions & 0 deletions tests/packages/spam_module_src_root/package.nuon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
name: spam_module_src_root,
type: module,
version: "0.1.0"
root: "./src/"
}
3 changes: 3 additions & 0 deletions tests/packages/spam_module_src_root/src/mod.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export def main [] {
"Hello world!"
}

0 comments on commit 724d97b

Please sign in to comment.