Skip to content

Commit a50b6bb

Browse files
committed
test: Checking directories now more accurate
Explicitly looks for a 40 character Git SHA-1 hash
1 parent e1fd772 commit a50b6bb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/basalt-install.bats

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ load './util/init.sh'
1111

1212
assert_success
1313

14-
assert [ "$(readlink "./.basalt/packages/local/fake_remote_user_repo"*)" = "$BASALT_GLOBAL_DATA_DIR/store/packages/local/fake_remote_user_repo"* ]
14+
assert [ "$(readlink "./.basalt/packages/local/fake_remote_user_repo@"????????????????????????????????????????)" = "$BASALT_GLOBAL_DATA_DIR/store/packages/local/fake_remote_user_repo"* ]
1515
}
1616

1717
@test "Installs two dependencies" {
@@ -23,8 +23,8 @@ load './util/init.sh'
2323
run basalt add "file://$dir1" "file://$dir2"
2424

2525
assert_success
26-
assert [ "$(readlink "./.basalt/packages/local/fake_remote_user_repo1"*)" = "$BASALT_GLOBAL_DATA_DIR/store/packages/local/fake_remote_user_repo1"* ]
27-
assert [ "$(readlink "./.basalt/packages/local/fake_remote_user_repo2"*)" = "$BASALT_GLOBAL_DATA_DIR/store/packages/local/fake_remote_user_repo2"* ]
26+
assert [ "$(readlink "./.basalt/packages/local/fake_remote_user_repo1@"????????????????????????????????????????)" = "$BASALT_GLOBAL_DATA_DIR/store/packages/local/fake_remote_user_repo1"* ]
27+
assert [ "$(readlink "./.basalt/packages/local/fake_remote_user_repo2@"????????????????????????????????????????)" = "$BASALT_GLOBAL_DATA_DIR/store/packages/local/fake_remote_user_repo2"* ]
2828
}
2929

3030
@test "Installs transitive dependencies" {
@@ -37,6 +37,6 @@ load './util/init.sh'
3737
run basalt add "file://$dir1"
3838

3939
assert_success
40-
assert [ "$(readlink "./.basalt/packages/local/fake_remote_user_repo1"*)" = "$BASALT_GLOBAL_DATA_DIR/store/packages/local/fake_remote_user_repo1"* ]
41-
assert [ "$(readlink "./.basalt/transitive/packages/local/fake_remote_user_repo2"*)" = "$BASALT_GLOBAL_DATA_DIR/store/packages/local/fake_remote_user_repo2"* ]
40+
assert [ "$(readlink "./.basalt/packages/local/fake_remote_user_repo1@"????????????????????????????????????????)" = "$BASALT_GLOBAL_DATA_DIR/store/packages/local/fake_remote_user_repo1"* ]
41+
assert [ "$(readlink "./.basalt/transitive/packages/local/fake_remote_user_repo2@"????????????????????????????????????????)" = "$BASALT_GLOBAL_DATA_DIR/store/packages/local/fake_remote_user_repo2"* ]
4242
}

0 commit comments

Comments
 (0)