Skip to content

Commit 51b2b6a

Browse files
committed
Merge #90: Disable regex tests when repl feature not enabled
953c097 Disable regex tests when repl feature not enabled (Steve Myers) Pull request description: ### Description I noticed that when I disable default features and don't enable the `repl` feature that the regex tests fail because they need the regex dependency that the `repl` feature brings in. This PR is to simply disable the regex related test code if the `repl` feature isn't enabled. ### Notes to the reviewers ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [ ] I've added tests for the new feature * [ ] I've added docs for the new feature * [ ] I've updated `CHANGELOG.md` #### Bugfixes: * [ ] This pull request breaks the existing API * [ ] I've added tests to reproduce the issue which are now passing * [ ] I'm linking the issue being fixed by this PR ACKs for top commit: rajarshimaitra: ACK 953c097 Tree-SHA512: b4aa8ecfc077bd06a578f5f8df054aff4dda496e7afd0c4f1d385aa1e5a5e2d452f8cf49fcc902abf2463a13ea0b99b38671262ea296c9a40243219731d0caa4
2 parents d5155a5 + 953c097 commit 51b2b6a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bdk_cli.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,12 @@ fn handle_command(cli_opts: CliOpts, network: Network, _backend: Backend) -> Res
560560

561561
#[cfg(test)]
562562
mod test {
563+
#[cfg(feature = "repl")]
563564
use crate::REPL_LINE_SPLIT_REGEX;
565+
#[cfg(feature = "repl")]
564566
use regex::Regex;
565567

568+
#[cfg(feature = "repl")]
566569
#[test]
567570
fn test_regex_double_quotes() {
568571
let split_regex = Regex::new(REPL_LINE_SPLIT_REGEX).unwrap();
@@ -589,6 +592,7 @@ mod test {
589592
);
590593
}
591594

595+
#[cfg(feature = "repl")]
592596
#[test]
593597
fn test_regex_single_quotes() {
594598
let split_regex = Regex::new(REPL_LINE_SPLIT_REGEX).unwrap();

0 commit comments

Comments
 (0)