gnu-cobol: use “squiggly” heredocs.
This commit is contained in:
parent
35e4fae4b7
commit
cd4270f969
1 changed files with 7 additions and 6 deletions
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue