Skip to content

Commit da10d21

Browse files
committed
fix tests
1 parent 6e2463b commit da10d21

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

benches/benchmark_portscan.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ fn criterion_benchmark(c: &mut Criterion) {
6464
true,
6565
vec![],
6666
false,
67+
false,
6768
);
6869

6970
c.bench_function("portscan tcp", |b| {
@@ -80,6 +81,7 @@ fn criterion_benchmark(c: &mut Criterion) {
8081
true,
8182
vec![],
8283
true,
84+
false,
8385
);
8486

8587
let mut udp_group = c.benchmark_group("portscan udp");

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
//! true, // accessible, should the output be A11Y compliant?
3333
//! vec![9000], // What ports should RustScan exclude?
3434
//! false, // is this a UDP scan?
35+
//! false, // Output closed ports?
3536
//! );
3637
//!
3738
//! let scan_result = block_on(scanner.run());

src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use std::string::ToString;
1717
use std::time::Duration;
1818

1919
use rustscan::address::parse_addresses;
20+
use rustscan::scanner::PortStatus;
2021

2122
extern crate colorful;
2223
extern crate dirs;
@@ -35,8 +36,6 @@ extern crate log;
3536
/// Faster Nmap scanning with Rust
3637
/// If you're looking for the actual scanning, check out the module Scanner
3738
fn main() {
38-
use rustscan::scanner::PortStatus;
39-
4039
#[cfg(not(unix))]
4140
let _ = ansi_term::enable_ansi_support();
4241

src/scanner/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ mod tests {
353353
true,
354354
vec![9000],
355355
false,
356+
false,
356357
);
357358
block_on(scanner.run());
358359
// if the scan fails, it wouldn't be able to assert_eq! as it panicked!
@@ -377,6 +378,7 @@ mod tests {
377378
true,
378379
vec![9000],
379380
false,
381+
false,
380382
);
381383
block_on(scanner.run());
382384
// if the scan fails, it wouldn't be able to assert_eq! as it panicked!
@@ -400,6 +402,7 @@ mod tests {
400402
true,
401403
vec![9000],
402404
false,
405+
false,
403406
);
404407
block_on(scanner.run());
405408
assert_eq!(1, 1);
@@ -422,6 +425,7 @@ mod tests {
422425
true,
423426
vec![9000],
424427
false,
428+
false,
425429
);
426430
block_on(scanner.run());
427431
assert_eq!(1, 1);
@@ -447,6 +451,7 @@ mod tests {
447451
true,
448452
vec![9000],
449453
false,
454+
false,
450455
);
451456
block_on(scanner.run());
452457
assert_eq!(1, 1);
@@ -471,6 +476,7 @@ mod tests {
471476
true,
472477
vec![9000],
473478
true,
479+
false,
474480
);
475481
block_on(scanner.run());
476482
// if the scan fails, it wouldn't be able to assert_eq! as it panicked!
@@ -495,6 +501,7 @@ mod tests {
495501
true,
496502
vec![9000],
497503
true,
504+
false,
498505
);
499506
block_on(scanner.run());
500507
// if the scan fails, it wouldn't be able to assert_eq! as it panicked!
@@ -518,6 +525,7 @@ mod tests {
518525
true,
519526
vec![9000],
520527
true,
528+
false,
521529
);
522530
block_on(scanner.run());
523531
assert_eq!(1, 1);
@@ -540,6 +548,7 @@ mod tests {
540548
true,
541549
vec![9000],
542550
true,
551+
false,
543552
);
544553
block_on(scanner.run());
545554
assert_eq!(1, 1);

0 commit comments

Comments
 (0)