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

prefer hyphens in test files named after issue numbers #38473

Merged
merged 1 commit into from
Jan 3, 2017

Conversation

zackmdavis
Copy link
Member

We have a lot of tests with filenames honoring particular issues by
number. Typically, these are called issue-${issue_no}.rs (note the
hyphen):

$ find . -regextype posix-egrep -regex '.*/issue-[0-9]*.rs' | wc
   1289    1289   35935

We also had a much smaller number of files that are like this, but don't
have a hyphen in between the substring issue and the number:

$ find . -regextype posix-egrep -regex '.*/issue[0-9]*.rs'
./debuginfo/issue14411.rs
./debuginfo/issue12886.rs
./debuginfo/issue13213.rs
./debuginfo/issue22656.rs
./debuginfo/issue7712.rs
./compile-fail/issue32829.rs
./run-pass/issue24353.rs
./run-pass/issue34796.rs
./run-pass/issue18173.rs
./run-pass/issue22346.rs
./run-pass/auxiliary/issue13507.rs
./run-pass/issue26127.rs
./run-pass/issue22008.rs
./run-pass/issue34569.rs
./run-pass/issue29927.rs
./run-pass/issue36260.rs

Some would argue that the inconsistency is æsthetically displeasing,
hence this trivial patch. (Note that run-pass/auxiliary/issue13507.rs
has an excuse; it's used in run-pass/issue-13507-2.rs; the matter of
there being two different compile-fail tests with different name
conventions for issue no. 32829 is also neglected here for the sake of
keeping this trivial cleanup patch as trivial as possible for ease of
review.)

We have a lot of tests with filenames honoring particular issues by
number. Typically, these are called issue-${issue_no}.rs (note the
hyphen):

```
$ find . -regextype posix-egrep -regex '.*/issue-[0-9]*.rs' | wc
   1289    1289   35935
```

We also had a much smaller number of files that are like this, but don't
have a hyphen in between the substring `issue` and the number:

```
$ find . -regextype posix-egrep -regex '.*/issue[0-9]*.rs'
./debuginfo/issue14411.rs
./debuginfo/issue12886.rs
./debuginfo/issue13213.rs
./debuginfo/issue22656.rs
./debuginfo/issue7712.rs
./compile-fail/issue32829.rs
./run-pass/issue24353.rs
./run-pass/issue34796.rs
./run-pass/issue18173.rs
./run-pass/issue22346.rs
./run-pass/auxiliary/issue13507.rs
./run-pass/issue26127.rs
./run-pass/issue22008.rs
./run-pass/issue34569.rs
./run-pass/issue29927.rs
./run-pass/issue36260.rs
```

Some would argue that the inconsistency is æsthetically displeasing,
hence this trivial patch. (Note that run-pass/auxiliary/issue13507.rs
has an excuse; it's `use`d in run-pass/issue-13507-2.rs; the matter of
there being two different compile-fail tests with different name
conventions for issue rust-lang#32829 is also neglected here for the sake of
keeping this trivial cleanup patch as trivial as possible for ease of
review.)
@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@petrochenkov
Copy link
Contributor

There are also issue_ and issue with something after digits.
find . -regextype posix-egrep -regex '.*/issue[^-].*rs' gives better picture.

@nagisa
Copy link
Member

nagisa commented Dec 19, 2016

Also

$ find -iname 'bug*'
./run-fail/bug-811.rs
./run-fail/bug-2470-bounds-check-overflow.rs
./run-pass/bug-7295.rs
./run-pass/bug-7183-generics.rs

@sanxiyn
Copy link
Member

sanxiyn commented Jan 3, 2017

@bors r+ rollup

You are welcome to do issue_* (note underline) and bug-* later. Thanks!

@bors
Copy link
Contributor

bors commented Jan 3, 2017

📌 Commit 63cfedb has been approved by sanxiyn

@bors
Copy link
Contributor

bors commented Jan 3, 2017

⌛ Testing commit 63cfedb with merge 8f62c29...

bors added a commit that referenced this pull request Jan 3, 2017
prefer hyphens in test files named after issue numbers

We have a lot of tests with filenames honoring particular issues by
number. Typically, these are called issue-${issue_no}.rs (note the
hyphen):

```
$ find . -regextype posix-egrep -regex '.*/issue-[0-9]*.rs' | wc
   1289    1289   35935
```

We also had a much smaller number of files that are like this, but don't
have a hyphen in between the substring `issue` and the number:

```
$ find . -regextype posix-egrep -regex '.*/issue[0-9]*.rs'
./debuginfo/issue14411.rs
./debuginfo/issue12886.rs
./debuginfo/issue13213.rs
./debuginfo/issue22656.rs
./debuginfo/issue7712.rs
./compile-fail/issue32829.rs
./run-pass/issue24353.rs
./run-pass/issue34796.rs
./run-pass/issue18173.rs
./run-pass/issue22346.rs
./run-pass/auxiliary/issue13507.rs
./run-pass/issue26127.rs
./run-pass/issue22008.rs
./run-pass/issue34569.rs
./run-pass/issue29927.rs
./run-pass/issue36260.rs
```

Some would argue that the inconsistency is æsthetically displeasing,
hence this trivial patch. (Note that run-pass/auxiliary/issue13507.rs
has an excuse; it's `use`d in run-pass/issue-13507-2.rs; the matter of
there being two different compile-fail tests with different name
conventions for issue no. 32829 is also neglected here for the sake of
keeping this trivial cleanup patch as trivial as possible for ease of
review.)
@bors
Copy link
Contributor

bors commented Jan 3, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: sanxiyn
Pushing 8f62c29 to master...

@bors bors merged commit 63cfedb into rust-lang:master Jan 3, 2017
zackmdavis added a commit to zackmdavis/rust that referenced this pull request Feb 5, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 5, 2017
…oogaloo, r=petrochenkov

continue to prefer hyphens in test files named after issue numbers

a [followup](rust-lang#38473 (comment)) to rust-lang#38473

(The files in `auxillary/` directories have an excuse, as they get used as crates/modules, for which snake_case names make more sense.)
@zackmdavis zackmdavis deleted the issue_kebab branch January 13, 2018 07:42
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.

7 participants