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
  • Loading branch information
Josh-Tilles authored Aug 15, 2020
1 parent 292fef7 commit 2bc0f07
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 2bc0f07

Please sign in to comment.