Skip to content

Commit

Permalink
agda: fix test by migrating to Cabal v2 commands
Browse files Browse the repository at this point in the history
Fixes #58984

Relates to #55253

Closes #59709.

Signed-off-by: chenrui <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
  • Loading branch information
Josh-Tilles authored and BrewTestBot committed Aug 23, 2020
1 parent 05594e9 commit f8d189d
Showing 1 changed file with 8 additions and 13 deletions.
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

0 comments on commit f8d189d

Please sign in to comment.