diff options
author | Andrew Gallant <jamslam@gmail.com> | 2019-01-19 10:15:56 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2019-01-19 10:44:30 -0500 |
commit | 7a6a40bae18f89bcfc6997479d7202d2c098e964 (patch) | |
tree | 2d75e646bd424e858570e728d370f26af6c0d6a6 /tests | |
parent | 1e9ee2cc85da6f18b72ea554010810c317c31031 (diff) |
edition: move core ripgrep to Rust 2018
Diffstat (limited to 'tests')
-rw-r--r-- | tests/feature.rs | 4 | ||||
-rw-r--r-- | tests/json.rs | 5 | ||||
-rw-r--r-- | tests/macros.rs | 4 | ||||
-rw-r--r-- | tests/misc.rs | 4 | ||||
-rw-r--r-- | tests/multiline.rs | 4 | ||||
-rw-r--r-- | tests/regression.rs | 4 | ||||
-rw-r--r-- | tests/tests.rs | 5 |
7 files changed, 13 insertions, 17 deletions
diff --git a/tests/feature.rs b/tests/feature.rs index 5b14a0d2..d27fbf2f 100644 --- a/tests/feature.rs +++ b/tests/feature.rs @@ -1,5 +1,5 @@ -use hay::{SHERLOCK, SHERLOCK_CRLF}; -use util::{Dir, TestCommand, sort_lines}; +use crate::hay::{SHERLOCK, SHERLOCK_CRLF}; +use crate::util::{Dir, TestCommand, sort_lines}; // See: https://github.com/BurntSushi/ripgrep/issues/1 rgtest!(f1_sjis, |dir: Dir, mut cmd: TestCommand| { diff --git a/tests/json.rs b/tests/json.rs index 7a7bd4d0..c0b064b1 100644 --- a/tests/json.rs +++ b/tests/json.rs @@ -1,9 +1,10 @@ use std::time; +use serde_derive::Deserialize; use serde_json as json; -use hay::{SHERLOCK, SHERLOCK_CRLF}; -use util::{Dir, TestCommand}; +use crate::hay::{SHERLOCK, SHERLOCK_CRLF}; +use crate::util::{Dir, TestCommand}; #[derive(Clone, Debug, Deserialize, PartialEq, Eq)] #[serde(tag = "type", content = "data")] diff --git a/tests/macros.rs b/tests/macros.rs index 24bf13f8..28b799d9 100644 --- a/tests/macros.rs +++ b/tests/macros.rs @@ -3,11 +3,11 @@ macro_rules! rgtest { ($name:ident, $fun:expr) => { #[test] fn $name() { - let (dir, cmd) = ::util::setup(stringify!($name)); + let (dir, cmd) = crate::util::setup(stringify!($name)); $fun(dir, cmd); if cfg!(feature = "pcre2") { - let (dir, cmd) = ::util::setup_pcre2(stringify!($name)); + let (dir, cmd) = crate::util::setup_pcre2(stringify!($name)); $fun(dir, cmd); } } diff --git a/tests/misc.rs b/tests/misc.rs index 9b5a7a75..31662871 100644 --- a/tests/misc.rs +++ b/tests/misc.rs @@ -1,5 +1,5 @@ -use hay::SHERLOCK; -use util::{Dir, TestCommand, cmd_exists, sort_lines}; +use crate::hay::SHERLOCK; +use crate::util::{Dir, TestCommand, cmd_exists, sort_lines}; // This file contains "miscellaneous" tests that were either written before // features were tracked more explicitly, or were simply written without diff --git a/tests/multiline.rs b/tests/multiline.rs index 5a569358..41b4d3ad 100644 --- a/tests/multiline.rs +++ b/tests/multiline.rs @@ -1,5 +1,5 @@ -use hay::SHERLOCK; -use util::{Dir, TestCommand}; +use crate::hay::SHERLOCK; +use crate::util::{Dir, TestCommand}; // This tests that multiline matches that span multiple lines, but where // multiple matches may begin and end on the same line work correctly. diff --git a/tests/regression.rs b/tests/regression.rs index abf29bdd..4ee3ab53 100644 --- a/tests/regression.rs +++ b/tests/regression.rs @@ -1,5 +1,5 @@ -use hay::SHERLOCK; -use util::{Dir, TestCommand, sort_lines}; +use crate::hay::SHERLOCK; +use crate::util::{Dir, TestCommand, sort_lines}; // See: https://github.com/BurntSushi/ripgrep/issues/16 rgtest!(r16, |dir: Dir, mut cmd: TestCommand| { diff --git a/tests/tests.rs b/tests/tests.rs index ceff7bc2..29cc5824 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -1,8 +1,3 @@ -extern crate serde; -#[macro_use] -extern crate serde_derive; -extern crate serde_json; - // Macros useful for testing. #[macro_use] mod macros; |