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

FullAcAutomaton fails depending of the order of the patterns #37

Closed
calixteman opened this issue Oct 19, 2018 · 0 comments
Closed

FullAcAutomaton fails depending of the order of the patterns #37

calixteman opened this issue Oct 19, 2018 · 0 comments

Comments

@calixteman
Copy link

let aut = AcAutomaton::new(vec!["libcore/", "libstd/"]);
let aut = FullAcAutomaton::new(aut);
let matches: Vec<_> = aut.find_overlapping("libcore/char/methods.rs").collect();
assert_eq!(matches, vec![Match {pati: 0, start: 0, end: 8}]);

let aut = AcAutomaton::new(vec!["libstd/", "libcore/"]);
let aut = FullAcAutomaton::new(aut);
let matches: Vec<_> = aut.find_overlapping("libcore/char/methods.rs").collect();
assert_eq!(matches, vec![Match {pati: 1, start: 0, end: 8}]);

The second assertion is failing.
If I comment the lines let aut = FullAcAutomaton::new(aut);, everything is ok.
This bug is a followup on:
BurntSushi/ripgrep#1079

BurntSushi added a commit that referenced this issue Feb 16, 2019
This bug had the same root cause as #37.
BurntSushi added a commit to BurntSushi/ripgrep that referenced this issue Feb 16, 2019
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

No branches or pull requests

1 participant