Skip to content

[WIP] use wildcard to check test outputs#3

Merged
ry merged 2 commits into
denoland:masterfrom
qti3e:q/wildcard
May 30, 2018
Merged

[WIP] use wildcard to check test outputs#3
ry merged 2 commits into
denoland:masterfrom
qti3e:q/wildcard

Conversation

@qti3e

@qti3e qti3e commented May 29, 2018

Copy link
Copy Markdown
Contributor

No description provided.

@ry ry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thank you! I have a few comments...

Comment thread wildcard.go Outdated

var WILDCARD = []byte("[WILDCARD]")

func Wildcard(pattern []byte, text []byte) bool {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be better inside the util.go file and tests in util_test.go. And it should be lowercase (not exported).

Comment thread wildcard_test.go Outdated
return Wildcard([]byte(a), []byte(b))
}

func TestWildcard(t *testing.T) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Move this to util_test.go

Comment thread integration_test.go Outdated
var out bytes.Buffer
cmd.Stdout = &out
err = cmd.Run()
cmd.Wait()

@ry ry May 29, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes. Was this causing a race condition?
Edit: I think this does nothing. Run already waits.

Comment thread integration_test.go Outdated

actual, _, err := deno(jsFile)
fmt.Println(jsFile)
fmt.Println(string(actual))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

@qti3e

qti3e commented May 29, 2018

Copy link
Copy Markdown
Contributor Author

@ry there is a bug which lays down somewhere else rather than this pr, the test result shows that deno() can't read stdout of ./deno testdata/013_async_throw.ts:
https://travis-ci.com/ry/deno/builds/74769626#L5349

@CLAassistant

CLAassistant commented May 30, 2018

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@ry ry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've solved the bug you were having and made some other fix ups - pushed to your branch: qti3e/deno@d26704a

I will squash it all into one commit when landing.

Thanks Parsa!

Comment thread util.go Outdated

var WILDCARD = []byte("[WILDCARD]")

func wildcard(pattern []byte, text []byte) bool {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should operate on strings instead of byte arrays?

@qti3e

qti3e commented May 30, 2018

Copy link
Copy Markdown
Contributor Author

My pleasure Ryan! (thanks for fixups btw!)

@ry
ry merged commit 2242c6c into denoland:master May 30, 2018
@qti3e
qti3e deleted the q/wildcard branch May 30, 2018 13:11
piscisaureus added a commit that referenced this pull request Oct 26, 2021
piscisaureus added a commit that referenced this pull request Oct 26, 2021
piscisaureus added a commit that referenced this pull request Oct 26, 2021
willnewby pushed a commit that referenced this pull request Apr 19, 2023
willnewby pushed a commit that referenced this pull request Apr 19, 2023
bartlomieju added a commit that referenced this pull request Jul 9, 2026
- extract_tarball_gz: skip symlink/hardlink tar entries (path-traversal via a
  symlink to an outside dir + a file nested under it, on arbitrary registry/@jsr
  content).
- Rebase the user's compilerOptions.paths + baseUrl onto .deno/ (the generated
  tsconfig lives one level down); they were copied verbatim, so `~/*`->`./src/*`
  resolved to .deno/src/* and broke every import through a user alias. Dropped
  paths/baseUrl from passthrough; added rebase_onto_deno_dir + test.
- sync_types_command: check node_modules/.deno components on the path RELATIVE to
  the project root, so an ancestor dir named node_modules/.deno no longer filters
  every root away (empty graph, no error).
- ensure_root_tsconfig: edit the existing tsconfig by byte-range splice via the
  jsonc AST instead of re-serializing, preserving the user's comments and
  formatting (previously silently stripped on the first sync).
- strip_top_level_type_decls: bound the leading-comment back-pop to contiguous
  comment lines (an unbounded 'pop until /**' could delete earlier decls), and
  make the type-alias skip track bracket depth so an interior ';' doesn't end it
  early.

Deferred (noted on the PR): resolution flags incl --allow-import (#3),
skipped-remote policy (#4), import-map scopes (#8), @types/node via #35889 (#10).
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.

3 participants