From 929dea23dc5998d5306fef8521e79cff02de2fe5 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Fri, 26 May 2017 14:18:39 +0200 Subject: [PATCH 1/2] Add dotd test --- dotty.rb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/dotty.rb b/dotty.rb index 8b4e18e..7b8f09e 100644 --- a/dotty.rb +++ b/dotty.rb @@ -1,8 +1,8 @@ class Dotty < Formula desc "Experimental Scala Compiler" homepage "http://dotty.epfl.ch/" - url "https://github.com/lampepfl/homebrew-brew/releases/download/v0.1-M1/dotty-0.1.1-bin-SNAPSHOT.zip" - sha256 "d5091aea45679c28774bb2039847a36a7c1f2a1abbe4ae9f79bf669afbca0232" + url "https://github.com/lampepfl/homebrew-brew/releases/download/v0.1-M2/dotty-0.1.1-bin-SNAPSHOT.zip" + sha256 "03d40979cfd265aecbdd5f4d8bed091b2328bdf54230ce42fffd039d9ee18a86" # mirror "https://www.scala-lang.org/files/archive/scala-2.12.2.tgz" bottle :unneeded @@ -15,6 +15,7 @@ def install end test do + # test dotc and dotr: file = testpath/"Test.scala" file.write <<-EOS.undent object Test { @@ -28,5 +29,16 @@ def main(args: Array[String]) = { out = shell_output("#{bin}/dotr Test").strip assert_equal "4", out + + # test dotd: + Dir.mkdir "#{testpath}/site" + index_out = testpath/"site"/"index.md" + index_out.write <<-EOS.undent + Hello, world! + ============= + EOS + shell_output("#{bin}/dotd -siteroot #{testpath}/site #{file}") + index_file = File.open("#{testpath}/site/_site/index.html", "rb").read + assert index_file.include? '

Hello, world!

' end end From 371734dc5353ae30962140bc603da7ff728dd227 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Fri, 26 May 2017 14:32:46 +0200 Subject: [PATCH 2/2] Make sure travis tests local version of dotty.rb --- osx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osx b/osx index e2af3e3..b48586d 100755 --- a/osx +++ b/osx @@ -1,2 +1,2 @@ -brew install lampepfl/brew/dotty -brew test dotty +brew install dotty.rb +brew test dotty.rb