ats2-postiats: use Pathname.write

This commit is contained in:
Adam Vandenberg 2014-07-27 17:02:07 -07:00
parent 7109e30c83
commit c5c764036c

View file

@ -26,12 +26,10 @@ class Ats2Postiats < Formula
end
test do
File.open("hello.dats", "w") do |f|
f.write <<-EOF.undent
val _ = print ("Hello, world!\n")
implement main0 () = ()
EOF
end
(testpath/"hello.dats").write <<-EOS.undent
val _ = print ("Hello, world!\n")
implement main0 () = ()
EOS
system "#{bin}/patscc hello.dats -o hello"
IO.popen("./hello", "r") do |pipe|
assert_match "Hello, world!", pipe.read