From 2bc0f072517177df6b50c6a3e66f5e851b9c8e1d Mon Sep 17 00:00:00 2001 From: Josh Tilles Date: Sat, 15 Aug 2020 19:06:45 -0400 Subject: [PATCH] agda: fix test by migrating to Cabal v2 commands Fixes #58984 Relates to #55253 --- Formula/agda.rb | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/Formula/agda.rb b/Formula/agda.rb index bfd5db55e4c2f..2a70b7aeeddde 100644 --- a/Formula/agda.rb +++ b/Formula/agda.rb @@ -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