Skip to content

Commit

Permalink
Fix some of the bats tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tchajed committed Jul 16, 2024
1 parent a4b2471 commit ada6c5e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/goose.bats
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ setup_file() {
export TEST_DIR="$GOOSE/testdata/goose-tests"
cd "$TEST_DIR" || exit 1
# goose output should be emitted here
export OUT="Goose/example_dot_com/goose_dash_demo"
export OUT="Goose/example_com/goose_demo"
}

setup() {
Expand Down Expand Up @@ -52,7 +52,7 @@ assert_file_not_exist() {
@test "goose current directory" {
goose -out Goose
run cat "$OUT"/m.v
assert_output --partial "From Goose Require github_dot_com.tchajed.marshal."
assert_output --partial "From New.code Require github_com.tchajed.marshal."
assert_output --partial "Section code."
}

Expand All @@ -64,14 +64,14 @@ assert_file_not_exist() {
@test "goose with multiple patterns" {
goose -out Goose . ./use_disk ./use_grove
assert_file_exists "$OUT"/m.v
assert_file_exists "$OUT"/m/use__disk.v
assert_file_exists "$OUT"/m/use__grove.v
assert_file_exists "$OUT"/m/use_disk.v
assert_file_exists "$OUT"/m/use_grove.v
}

@test "goose grove_ffi" {
goose -out Goose ./use_grove
run cat "$OUT"/m/use__grove.v
assert_output --partial "Import ffi.grove_prelude"
assert_output --partial "grove_prelude"
}

@test "goose bad path" {
Expand All @@ -81,7 +81,7 @@ assert_file_not_exist() {
}

@test "goose with one error" {
run goose -out Goose ./use_disk ./errors/not_goose
run goose -out Goose ./use_grove ./errors/not_goose
# fails, but does output correct file
assert_failure
assert_file_exists "$OUT"/m/use__disk.v
Expand All @@ -106,7 +106,7 @@ assert_file_not_exist() {

@test "goose on external package" {
goose -out Goose github.com/tchajed/marshal
run cat Goose/github_dot_com/tchajed/marshal.v
run cat Goose/github_com/tchajed/marshal.v
assert_output --partial "NewEnc"
}

Expand Down

0 comments on commit ada6c5e

Please sign in to comment.