aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/tests')
-rw-r--r--crates/shirabe/tests/all_functional_test.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/shirabe/tests/all_functional_test.rs b/crates/shirabe/tests/all_functional_test.rs
index ad075ad6..d947a054 100644
--- a/crates/shirabe/tests/all_functional_test.rs
+++ b/crates/shirabe/tests/all_functional_test.rs
@@ -9,7 +9,7 @@ use indexmap::IndexMap;
use serial_test::serial;
use shirabe::util::filesystem::Filesystem;
use shirabe_pcre::preg::Preg;
-use shirabe_php_shim::{CaptureKey, PhpMixed, intval, php_regex, preg_split_delim_capture};
+use shirabe_php_shim::{PhpMixed, intval, php_regex, preg_split_delim_capture};
use std::path::{Path, PathBuf};
/// ref: AllFunctionalTest's `$oldcwd` / `$testDir` instance state plus its `setUp`/`tearDown`.
@@ -144,11 +144,11 @@ fn expect_matches(expected: &str, output: &str) {
let Some(m) = Preg::is_match3(php_regex!("{%(.+?)%}"), &expected[i..]) else {
panic!("Failed to match %...% in {}", &expected[i..]);
};
- let regex = m.get(&CaptureKey::ByIndex(1)).map(str::to_string).unwrap();
+ let regex = m.get(1).map(str::to_string).unwrap();
let pattern = format!("{{{}}}", regex);
if let Some(m) = Preg::is_match3(&pattern, &output[j..]) {
- let full = m.get(&CaptureKey::ByIndex(0)).map(str::to_string).unwrap();
+ let full = m.get(0).map(str::to_string).unwrap();
i += regex.len() + 2;
j += full.len();
continue;