Skip to content

Instantly share code, notes, and snippets.

@hinrik
Created July 22, 2018 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hinrik/747587c37c2119c2815b7bf729a93cda to your computer and use it in GitHub Desktop.
Save hinrik/747587c37c2119c2815b7bf729a93cda to your computer and use it in GitHub Desktop.
$ make spec
Using /usr/bin/llvm-config-4.0 [version=4.0.1]
./bin/crystal build -o .build/all_spec spec/all_spec.cr
Using compiled compiler at `.build/crystal'
Error in spec/all_spec.cr:3: while requiring "./std_spec"
require "./std_spec"
^
in spec/std_spec.cr:2: while requiring "./std/**"
require "./std/**"
^
in spec/std/file_spec.cr:587: expanding macro
{% unless flag?(:win32) %}
^
in spec/std/file_spec.cr:587: expanding macro
{% unless flag?(:win32) %}
^
in macro 'macro_94418118638656' /home/hinrik/src/crystal/spec/std/file_spec.cr:587, line 8:
1.
2. it "converts a pathname to an absolute pathname, using ~ (home) as base (trailing /)" do
3. prev_home = home
4. begin
5. ENV["HOME"] = File.expand_path(datapath)
6. File.expand_path("~/").should eq(home)
7. File.expand_path("~/..badfilename").should eq(File.join(home, "..badfilename"))
> 8. File.expand_path("..").should eq("/#{base.split('/')[0...-1].join('/')}".gsub(/\A\/\//, "/"))
9. File.expand_path("~/a", "~/b").should eq(File.join(home, "a"))
10. File.expand_path("~").should eq(home)
11. File.expand_path("~", "/tmp/gumby/ddd").should eq(home)
12. File.expand_path("~/a", "/tmp/gumby/ddd").should eq(File.join([home, "a"]))
13. ensure
14. ENV["HOME"] = prev_home
15. end
16. end
17.
18. it "converts a pathname to an absolute pathname, using ~ (home) as base (HOME=/)" do
19. prev_home = home
20. begin
21. ENV["HOME"] = "/"
22. File.expand_path("~/").should eq(home)
23. File.expand_path("~/..badfilename").should eq(File.join(home, "..badfilename"))
24. File.expand_path("..").should eq("/#{base.split('/')[0...-1].join('/')}".gsub(/\A\/\//, "/"))
25. File.expand_path("~/a", "~/b").should eq(File.join(home, "a"))
26. File.expand_path("~").should eq(home)
27. File.expand_path("~", "/tmp/gumby/ddd").should eq(home)
28. File.expand_path("~/a", "/tmp/gumby/ddd").should eq(File.join([home, "a"]))
29. ensure
30. ENV["HOME"] = prev_home
31. end
32. end
33.
read before assignment to local variable 'base'
Makefile:109: recipe for target '.build/all_spec' failed
make: *** [.build/all_spec] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment