-
-
Notifications
You must be signed in to change notification settings - Fork 368
Fix relative path test on Windows #618
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ import ( | |
| ) | ||
|
|
||
| func TestSubmitRelativePath(t *testing.T) { | ||
| t.Skip("The Windows build is failing and needs to be debugged.\nSee https://ci.appveyor.com/project/kytrinyx/cli/build/110") | ||
| //t.Skip("The Windows build is failing and needs to be debugged.\nSee https://ci.appveyor.com/project/kytrinyx/cli/build/110") | ||
|
|
||
| oldOut := Out | ||
| oldErr := Err | ||
|
|
@@ -30,6 +30,7 @@ func TestSubmitRelativePath(t *testing.T) { | |
|
|
||
| tmpDir, err := ioutil.TempDir("", "relative-path") | ||
| assert.NoError(t, err) | ||
| defer os.RemoveAll(tmpDir) | ||
|
|
||
| dir := filepath.Join(tmpDir, "bogus-track", "bogus-exercise") | ||
| os.MkdirAll(dir, os.FileMode(0755)) | ||
|
|
@@ -55,5 +56,5 @@ func TestSubmitRelativePath(t *testing.T) { | |
| assert.NoError(t, err) | ||
|
|
||
| assert.Equal(t, 1, len(submittedFiles)) | ||
| assert.Equal(t, "This is a file.", submittedFiles["/file.txt"]) | ||
| assert.Equal(t, "This is a file.", submittedFiles["\\file.txt"]) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OMG. Of course. This should be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think it will escape, but escaping is not needed as the key actually is
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's what the exercism API sends back, relative to the workspace directory, including the path separator. We could have done it either way, I don't think we had any reason to do one over the other.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/sends back/expects/ (sends back on the download)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait. uhm.... is it just setup in the test that does this? In that case I think you're right, we should just remove it.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the most reasonable thing right now is to keep the leading slash, since there are so many moving parts. It could be worth reconsidering down the road, as whether we change this now or later, we still have to be able to take into account the exercises that do have the leading slash.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with you on this one; especially since I have not been able to give a lot of time. I would hate to start a larger thing right now and not be able to follow it all the way through. If you are okay with it I will merge this in.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yepp, I think that's fine. I'll go ahead and merge. |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. I need to add this logic everywhere.