tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
just: make new bash completion test work from build
László Vaskó
2 years ago
8d548d61
21ea0e48
+29
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
ju
just
fix-just-path-in-tests.patch
package.nix
+20
pkgs/by-name/ju/just/fix-just-path-in-tests.patch
···
1
1
+
diff --git a/tests/completions/just.bash b/tests/completions/just.bash
2
2
+
index 6d5c12c..13bff87 100755
3
3
+
--- a/tests/completions/just.bash
4
4
+
+++ b/tests/completions/just.bash
5
5
+
@@ -17,11 +17,13 @@ reply_equals() {
6
6
+
fi
7
7
+
}
8
8
+
9
9
+
+just() {
10
10
+
+ cargo run -- "$@"
11
11
+
+}
12
12
+
+
13
13
+
# --- Initial Setup ---
14
14
+
source "$1"
15
15
+
cd tests/completions
16
16
+
-cargo build
17
17
+
-PATH="$(git rev-parse --show-toplevel)/target/debug:$PATH"
18
18
+
exit_code=0
19
19
+
20
20
+
# --- Tests ---
+9
pkgs/by-name/ju/just/package.nix
···
2
2
, stdenv
3
3
, fetchFromGitHub
4
4
, rustPlatform
5
5
+
, bashInteractive
5
6
, coreutils
6
7
, installShellFiles
7
8
, libiconv
···
42
43
43
44
# Return unchanged string.rs
44
45
cp $TMPDIR/string.rs tests/string.rs
46
46
+
47
47
+
# For shell completion tests
48
48
+
export PATH=${bashInteractive}/bin:$PATH
49
49
+
patchShebangs tests
45
50
'';
51
51
+
52
52
+
patches = [
53
53
+
./fix-just-path-in-tests.patch
54
54
+
];
46
55
47
56
postBuild = ''
48
57
cargo run --package generate-book