mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 06:42:28 +00:00
housekeeping: shellcheck for tests/functional/flakes/circular.sh
This commit is contained in:
parent
ece86b7191
commit
3b853e795b
@ -8,10 +8,10 @@ requireGit
|
||||
flakeA=$TEST_ROOT/flakeA
|
||||
flakeB=$TEST_ROOT/flakeB
|
||||
|
||||
createGitRepo $flakeA
|
||||
createGitRepo $flakeB
|
||||
createGitRepo "$flakeA"
|
||||
createGitRepo "$flakeB"
|
||||
|
||||
cat > $flakeA/flake.nix <<EOF
|
||||
cat > "$flakeA"/flake.nix <<EOF
|
||||
{
|
||||
inputs.b.url = git+file://$flakeB;
|
||||
inputs.b.inputs.a.follows = "/";
|
||||
@ -23,9 +23,9 @@ cat > $flakeA/flake.nix <<EOF
|
||||
}
|
||||
EOF
|
||||
|
||||
git -C $flakeA add flake.nix
|
||||
git -C "$flakeA" add flake.nix
|
||||
|
||||
cat > $flakeB/flake.nix <<EOF
|
||||
cat > "$flakeB"/flake.nix <<EOF
|
||||
{
|
||||
inputs.a.url = git+file://$flakeA;
|
||||
|
||||
@ -35,18 +35,18 @@ cat > $flakeB/flake.nix <<EOF
|
||||
}
|
||||
EOF
|
||||
|
||||
git -C $flakeB add flake.nix
|
||||
git -C $flakeB commit -a -m 'Foo'
|
||||
git -C "$flakeB" add flake.nix
|
||||
git -C "$flakeB" commit -a -m 'Foo'
|
||||
|
||||
[[ $(nix eval $flakeA#foo) = 1579 ]]
|
||||
[[ $(nix eval $flakeA#foo) = 1579 ]]
|
||||
[[ $(nix eval "$flakeA#foo") = 1579 ]]
|
||||
[[ $(nix eval "$flakeA#foo") = 1579 ]]
|
||||
|
||||
sed -i $flakeB/flake.nix -e 's/456/789/'
|
||||
git -C $flakeB commit -a -m 'Foo'
|
||||
sed -i "$flakeB"/flake.nix -e 's/456/789/'
|
||||
git -C "$flakeB" commit -a -m 'Foo'
|
||||
|
||||
nix flake update b --flake $flakeA
|
||||
[[ $(nix eval $flakeA#foo) = 1912 ]]
|
||||
nix flake update b --flake "$flakeA"
|
||||
[[ $(nix eval "$flakeA#foo") = 1912 ]]
|
||||
|
||||
# Test list-inputs with circular dependencies
|
||||
nix flake metadata $flakeA
|
||||
nix flake metadata "$flakeA"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user