diff options
Diffstat (limited to 'community/crystal/specs-tempdir-separate-helper.patch')
-rw-r--r-- | community/crystal/specs-tempdir-separate-helper.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/community/crystal/specs-tempdir-separate-helper.patch b/community/crystal/specs-tempdir-separate-helper.patch new file mode 100644 index 0000000000..9d07c0f8e6 --- /dev/null +++ b/community/crystal/specs-tempdir-separate-helper.patch @@ -0,0 +1,46 @@ +From 5f4c3697641654959a313a0332fbba59334f8ca3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Johannes=20M=C3=BCller?= <straightshoota@gmail.com> +Date: Mon, 2 Jul 2018 12:39:25 +0200 +Subject: [PATCH] Fix: Rename datapath helper to compiler_datapath for compiler specs + +Patch-Source: https://github.com/crystal-lang/crystal/pull/6312 +See-Also: https://github.com/crystal-lang/crystal/pull/5951#issuecomment-400986673 +--- + spec/compiler/compiler_spec.cr | 4 ++-- + spec/compiler/spec_helper.cr | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/spec/compiler/compiler_spec.cr b/spec/compiler/compiler_spec.cr +index 7fdbca20db..426a5324e0 100644 +--- a/spec/compiler/compiler_spec.cr ++++ b/spec/compiler/compiler_spec.cr +@@ -4,7 +4,7 @@ require "./spec_helper" + describe "Compiler" do + it "compiles a file" do + with_tempfile "compiler_spec_output" do |path| +- Crystal::Command.run ["build", datapath("compiler_sample"), "-o", path] ++ Crystal::Command.run ["build", compiler_datapath("compiler_sample"), "-o", path] + + File.exists?(path).should be_true + +@@ -13,7 +13,7 @@ describe "Compiler" do + end + + it "runs subcommand in preference to a filename " do +- Dir.cd datapath do ++ Dir.cd compiler_datapath do + with_tempfile "compiler_spec_output" do |path| + Crystal::Command.run ["build", "compiler_sample", "-o", path] + +diff --git a/spec/compiler/spec_helper.cr b/spec/compiler/spec_helper.cr +index 536691a5ad..8a7e40b314 100644 +--- a/spec/compiler/spec_helper.cr ++++ b/spec/compiler/spec_helper.cr +@@ -1,6 +1,6 @@ + require "../spec_helper" + require "../support/tempfile" + +-def datapath(*components) ++def compiler_datapath(*components) + File.join("spec", "compiler", "data", *components) + end |