about summary refs log tree commit diff
path: root/src/libregex/test/tests.rs
AgeCommit message (Collapse)AuthorLines
2015-01-23regex: Remove in-tree versionAlex Crichton-245/+0
The regex library was largely used for non-critical aspects of the compiler and various external tooling. The library at this point is duplicated with its out-of-tree counterpart and as such imposes a bit of a maintenance overhead as well as compile time hit for the compiler itself. The last major user of the regex library is the libtest library, using regexes for filters when running tests. This removal means that the filtering has gone back to substring matching rather than using regexes.
2015-01-06More test fixesAlex Crichton-1/+1
2015-01-07falloutNick Cameron-1/+1
2014-12-26Prevent Regex::new() from panicking when a non-AST item is repeatedBarosl Lee-0/+1
This bug has also affected the regex! macro, which has caused an ICE when such an invalid expression is provided. Fixes #20208.
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-112/+112
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-12-06libregex: remove unnecessary `as_slice` callsJorge Aparicio-5/+5
2014-11-04libsyntax: Forbid escapes in the inclusive range `\x80`-`\xff` inPatrick Walton-2/+4
Unicode characters and strings. Use `\u0080`-`\u00ff` instead. ASCII/byte literals are unaffected. This PR introduces a new function, `escape_default`, into the ASCII module. This was necessary for the pretty printer to continue to function. RFC #326. Closes #18062. [breaking-change]
2014-10-29auto merge of #17894 : steveklabnik/rust/fail_to_panic, r=aturonbors-2/+2
This in-progress PR implements https://github.com/rust-lang/rust/issues/17489. I made the code changes in this commit, next is to go through alllllllll the documentation and fix various things. - Rename column headings as appropriate, `# Panics` for panic conditions and `# Errors` for `Result`s. - clean up usage of words like 'fail' in error messages Anything else to add to the list, @aturon ? I think I should leave the actual functions with names like `slice_or_fail` alone, since you'll get to those in your conventions work? I'm submitting just the code bits now so that we can see it separately, and I also don't want to have to keep re-building rust over and over again if I don't have to :wink: Listing all the bits so I can remember as I go: - [x] compiler-rt - [x] compiletest - [x] doc - [x] driver - [x] etc - [x] grammar - [x] jemalloc - [x] liballoc - [x] libarena - [x] libbacktrace - [x] libcollections - [x] libcore - [x] libcoretest - [x] libdebug - [x] libflate - [x] libfmt_macros - [x] libfourcc - [x] libgetopts - [x] libglob - [x] libgraphviz - [x] libgreen - [x] libhexfloat - [x] liblibc - [x] liblog - [x] libnative - [x] libnum - [x] librand - [x] librbml - [x] libregex - [x] libregex_macros - [x] librlibc - [x] librustc - [x] librustc_back - [x] librustc_llvm - [x] librustdoc - [x] librustrt - [x] libsemver - [x] libserialize - [x] libstd - [x] libsync - [x] libsyntax - [x] libterm - [x] libtest - [x] libtime - [x] libunicode - [x] liburl - [x] libuuid - [x] llvm - [x] rt - [x] test
2014-10-29Rename fail! to panic!Steve Klabnik-2/+2
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-24regex: The first range in a character class can start with a left bracketPiotr Czarnecki-0/+7
2014-10-24regex: Escaped literals can end rangesPiotr Czarnecki-0/+11
2014-10-24regex: Fix control flow in the parserPiotr Czarnecki-0/+10
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-1/+1
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-1/+1
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-1/+1
2014-07-21Add a ton of ignore-lexer-testCorey Richardson-0/+1
2014-07-09fix test failureskwantam-2/+2
- unicode tests live in coretest crate - libcollections str tests need UnicodeChar trait. - libregex perlw tests were checking a char in the Alphabetic category, \x2161. Confirmed perl 5.18 considers this a \w character. Changed to \x2961, which is not \w as the test expects.
2014-06-03Fixes #13843.Andrew Gallant-0/+14
An empty regex is a valid regex that always matches. This behavior is consistent with at least Go and Python. A couple regression tests are included.
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-1/+1
[breaking-change]
2014-04-25Add a regex crate to the Rust distribution.Andrew Gallant-0/+199
Also adds a regex_macros crate, which provides natively compiled regular expressions with a syntax extension. Closes #3591. RFC: 0007-regexps