Skip to content

Commit 6b7db2f

Browse files
committed
fix tests
1 parent 52d1e04 commit 6b7db2f

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
@@ -45,6 +45,7 @@ fn criterion_benchmark(c: &mut Criterion) {
4545
true,
4646
vec![],
4747
false,
48+
false,
4849
);
4950

5051
c.bench_function("portscan tcp", |b| {
@@ -61,6 +62,7 @@ fn criterion_benchmark(c: &mut Criterion) {
6162
true,
6263
vec![],
6364
true,
65+
false,
6466
);
6567

6668
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
@@ -352,6 +352,7 @@ mod tests {
352352
true,
353353
vec![9000],
354354
false,
355+
false,
355356
);
356357
block_on(scanner.run());
357358
// if the scan fails, it wouldn't be able to assert_eq! as it panicked!
@@ -376,6 +377,7 @@ mod tests {
376377
true,
377378
vec![9000],
378379
false,
380+
false,
379381
);
380382
block_on(scanner.run());
381383
// if the scan fails, it wouldn't be able to assert_eq! as it panicked!
@@ -399,6 +401,7 @@ mod tests {
399401
true,
400402
vec![9000],
401403
false,
404+
false,
402405
);
403406
block_on(scanner.run());
404407
assert_eq!(1, 1);
@@ -421,6 +424,7 @@ mod tests {
421424
true,
422425
vec![9000],
423426
false,
427+
false,
424428
);
425429
block_on(scanner.run());
426430
assert_eq!(1, 1);
@@ -446,6 +450,7 @@ mod tests {
446450
true,
447451
vec![9000],
448452
false,
453+
false,
449454
);
450455
block_on(scanner.run());
451456
assert_eq!(1, 1);
@@ -470,6 +475,7 @@ mod tests {
470475
true,
471476
vec![9000],
472477
true,
478+
false,
473479
);
474480
block_on(scanner.run());
475481
// if the scan fails, it wouldn't be able to assert_eq! as it panicked!
@@ -494,6 +500,7 @@ mod tests {
494500
true,
495501
vec![9000],
496502
true,
503+
false,
497504
);
498505
block_on(scanner.run());
499506
// if the scan fails, it wouldn't be able to assert_eq! as it panicked!
@@ -517,6 +524,7 @@ mod tests {
517524
true,
518525
vec![9000],
519526
true,
527+
false,
520528
);
521529
block_on(scanner.run());
522530
assert_eq!(1, 1);
@@ -539,6 +547,7 @@ mod tests {
539547
true,
540548
vec![9000],
541549
true,
550+
false,
542551
);
543552
block_on(scanner.run());
544553
assert_eq!(1, 1);

0 commit comments

Comments
 (0)