Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix file spec when HOME ends with / #3666

Merged
merged 1 commit into from Dec 13, 2016
Merged

Conversation

RX14
Copy link
Contributor

@RX14 RX14 commented Dec 11, 2016

For example:

  1) File expand_path converts a pathname to an absolute pathname, using ~ (home) as base
	     Failure/Error: File.expand_path("~/").should eq(home)
	
	       expected: "/jenkins-slave/"
	            got: "/jenkins-slave"
	
	     # spec/std/file_spec.cr:417

@asterite
Copy link
Member

It seems a couple of specs still fail

@RX14
Copy link
Contributor Author

RX14 commented Dec 12, 2016

I guess travis's HOME is /. The speced method behaves correctly but the strip solution fails to give the correct expected answer.

@asterite
Copy link
Member

Maybe return "/" for home if it ends up being empty?

@asterite
Copy link
Member

(or return "/" if home is "/")

@RX14
Copy link
Contributor Author

RX14 commented Dec 13, 2016

Looks like it's going to pass this time.

@asterite asterite merged commit d7de3a1 into crystal-lang:master Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants