Merge pull request 'Add test boilerplate' (#2) from test-boilerplate into main
Reviewed-on: https://codeberg.org/svenvanheugten/git-check-assertions/pulls/2
This commit is contained in:
commit
390ea446de
4 changed files with 15 additions and 2 deletions
|
|
@ -7,7 +7,10 @@ end_of_line = lf
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
[*.sh]
|
[git-check-assertions]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.bats]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
[*.nix]
|
[*.nix]
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
packages.default = pkgs.writeShellApplication {
|
packages.default = pkgs.writeShellApplication {
|
||||||
name = "git-check-assertions";
|
name = "git-check-assertions";
|
||||||
runtimeInputs = [ pkgs.git ];
|
runtimeInputs = [ pkgs.git ];
|
||||||
text = builtins.readFile ./git-check-assertions.sh;
|
text = builtins.readFile ./git-check-assertions;
|
||||||
};
|
};
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
packages = with pkgs; [ bats ];
|
packages = with pkgs; [ bats ];
|
||||||
|
|
|
||||||
10
test.bats
Executable file
10
test.bats
Executable file
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
|
setup() {
|
||||||
|
DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
PATH="$DIR:$PATH"
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "can run" {
|
||||||
|
git-check-assertions
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue