gnu-cobol: use “squiggly” heredocs.

This commit is contained in:
ilovezfs 2018-02-15 08:11:45 -08:00
parent 35e4fae4b7
commit cd4270f969

View file

@ -65,12 +65,13 @@ class GnuCobol < Formula
end end
test do test do
(testpath/"hello.cob").write <<-EOS (testpath/"hello.cob").write <<~EOS
IDENTIFICATION DIVISION. * COBOL must be indented
PROGRAM-ID. hello. 000001 IDENTIFICATION DIVISION.
PROCEDURE DIVISION. 000002 PROGRAM-ID. hello.
DISPLAY "Hello World!". 000003 PROCEDURE DIVISION.
STOP RUN. 000004 DISPLAY "Hello World!".
000005 STOP RUN.
EOS EOS
system "#{bin}/cobc", "-x", testpath/"hello.cob" system "#{bin}/cobc", "-x", testpath/"hello.cob"
system testpath/"hello" system testpath/"hello"