Adds TestUASTGetLanguagesSuite/TestSameEnryLanguage#412
Open
se7entyse7en wants to merge 4 commits intosrc-d:masterfrom
Open
Adds TestUASTGetLanguagesSuite/TestSameEnryLanguage#412se7entyse7en wants to merge 4 commits intosrc-d:masterfrom
se7entyse7en wants to merge 4 commits intosrc-d:masterfrom
Conversation
This test ensures that the language label returned by enry is the same used by bblfsh Signed-off-by: Lou Marvin Caraig <loumarvincaraig@gmail.com>
se7entyse7en
commented
Apr 18, 2019
|
|
||
| if langName == "Bash" { | ||
| require.NotEqual(langName, detectedLang) | ||
| t.Skip("TEST FAILURE IS A KNOWN ISSUE") |
Contributor
Author
There was a problem hiding this comment.
Is this correct? Isn't this due to the aliasing problem that we also have on engine? But shouldn't it be true also for C#?
carlosms
reviewed
Apr 18, 2019
Signed-off-by: Lou Marvin Caraig <loumarvincaraig@gmail.com>
Signed-off-by: Lou Marvin Caraig <loumarvincaraig@gmail.com>
carlosms
reviewed
Apr 19, 2019
|
|
||
| content, filename := suite.getContentAndFilename(langName) | ||
| jsonRequest := fmt.Sprintf(`{ "content": "%s", "filename": "%s" }`, | ||
| escapeForJSON(content), filename) |
Contributor
There was a problem hiding this comment.
Instead of this manual escape you could do
j := struct {
Filename string
Content string
}{
Filename: filename,
Content: content,
}
b, _ := json.Marshal(j)
req, _ := http.NewRequest("POST", "/detect-lang", bytes.NewReader(b))or export detectLangRequest type and
j := handler.DetectLangRequest{
Filename: filename,
Content: content,
}
b, _ := json.Marshal(j)
req, _ := http.NewRequest("POST", "/detect-lang", bytes.NewReader(b))Signed-off-by: Lou Marvin Caraig <loumarvincaraig@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #314.
This test ensures that the language label returned by
enryis the sameused by
bblfsh.