Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agda: fix test by migrating to Cabal v2 commands #59709

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions Formula/agda.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,13 @@ module StdlibIOTest where
system bin/"agda", "--js", simpletest

# test the GHC backend
cabal_sandbox do
cabal_install "ieee754"
dbpath = Dir["#{testpath}/.cabal-sandbox/*-packages.conf.d"].first
dbopt = "--ghc-flag=-package-db=#{dbpath}"

# compile and run a simple program
system bin/"agda", "-c", dbopt, iotest
assert_equal "", shell_output(testpath/"IOTest")

# compile and run a program that uses the standard library
system bin/"agda", "-c", "-i", lib/"agda"/"src", dbopt, stdlibiotest
assert_equal "Hello, world!", shell_output(testpath/"StdlibIOTest")
end
system "cabal", "v2-update"
system "cabal", "v2-install", "ieee754", "--lib", *std_cabal_v2_args
# compile and run a simple program
system bin/"agda", "-c", iotest
assert_equal "", shell_output(testpath/"IOTest")
# compile and run a program that uses the standard library
system bin/"agda", "-c", "-i", lib/"agda"/"src", stdlibiotest
assert_equal "Hello, world!", shell_output(testpath/"StdlibIOTest")
end
end