Skip to content

Commit

Permalink
Merge pull request #201264 from Homebrew/lisp-heredoc
Browse files Browse the repository at this point in the history
formulae(lisp): use language-specific heredoc delimiters
  • Loading branch information
BrewTestBot authored Dec 15, 2024
2 parents 5dbe7ae + 4b5e632 commit f32349e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Formula/c/cask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def install
end

test do
(testpath/"Cask").write <<~EOS
(testpath/"Cask").write <<~LISP
(source gnu)
(depends-on "chess")
EOS
LISP
system bin/"cask", "install"
(testpath/".cask").directory?
end
Expand Down
4 changes: 2 additions & 2 deletions Formula/d/doxymacs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ def install
end

test do
(testpath/"test.el").write <<~EOS
(testpath/"test.el").write <<~LISP
(add-to-list 'load-path "#{elisp}")
(load "doxymacs")
(print doxymacs-version)
EOS
LISP

output = shell_output("emacs -Q --batch -l #{testpath}/test.el").strip
assert_equal "\"#{version}\"", output
Expand Down
4 changes: 2 additions & 2 deletions Formula/e/ecl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ def install
end

test do
(testpath/"simple.cl").write <<~EOS
(testpath/"simple.cl").write <<~LISP
(write-line (write-to-string (+ 2 2)))
EOS
LISP
assert_equal "4", shell_output("#{bin}/ecl -shell #{testpath}/simple.cl").chomp
end
end
4 changes: 2 additions & 2 deletions Formula/o/ol.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def install
end

test do
(testpath/"gcd.ol").write <<~EOS
(testpath/"gcd.ol").write <<~LISP
(print (gcd 1071 1029))
EOS
LISP
assert_equal "21", shell_output("#{bin}/ol gcd.ol").strip
end
end
8 changes: 4 additions & 4 deletions Formula/s/sbcl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ def install
SBCL_SOURCE_ROOT: pkgshare/"src",
SBCL_HOME: lib/"sbcl"
pkgshare.install %w[contrib src]
(lib/"sbcl/sbclrc").write <<~EOS
(lib/"sbcl/sbclrc").write <<~'LISP'
(setf (logical-pathname-translations "SYS")
'(("SYS:SRC;**;*.*.*" #p"#{pkgshare}/src/**/*.*")
("SYS:CONTRIB;**;*.*.*" #p"#{pkgshare}/contrib/**/*.*")))
EOS
LISP
end

test do
(testpath/"simple.sbcl").write <<~EOS
(testpath/"simple.sbcl").write <<~LISP
(write-line (write-to-string (+ 2 2)))
EOS
LISP
output = shell_output("#{bin}/sbcl --script #{testpath}/simple.sbcl")
assert_equal "4", output.strip
end
Expand Down

0 comments on commit f32349e

Please sign in to comment.