summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorClementTsang <clementjhtsang@gmail.com>2019-09-15 00:06:57 -0400
committerClementTsang <clementjhtsang@gmail.com>2019-09-15 00:06:57 -0400
commit282acd1395fb521be3ca94c7731abfdfa2c9ae0c (patch)
tree1539d67a995ba268ec1d70f3fb615fbe3c7c1d18 /tests
parent2435b9d90ce8029dd731238972f3610a56b6c3f9 (diff)
Made charting look better, switched back to braille markers (its the only way I could make it look good), and dealt with some issues regarding the display of networking.
Diffstat (limited to 'tests')
-rw-r--r--tests/arg_rate_tests.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/arg_rate_tests.rs b/tests/arg_rate_tests.rs
index f4c14687..f7ad7819 100644
--- a/tests/arg_rate_tests.rs
+++ b/tests/arg_rate_tests.rs
@@ -2,6 +2,7 @@ use assert_cmd::prelude::*; // Add methods on commands
use predicates::prelude::*;
use std::process::Command; // Run programs // Used for writing assertions
+//======================RATES======================//
#[test]
fn valid_rate_argument() {
}
@@ -18,6 +19,17 @@ fn test_small_rate() -> Result<(), Box<dyn std::error::Error>> {
}
#[test]
+fn test_large_rate() -> Result<(), Box<dyn std::error::Error>> {
+ Command::new("./target/debug/rustop")
+ .arg("-r")
+ .arg("18446744073709551616")
+ .assert()
+ .failure()
+ .stderr(predicate::str::contains("rate to be less than unsigned INT_MAX."));
+ Ok(())
+}
+
+#[test]
fn test_negative_rate() -> Result<(), Box<dyn std::error::Error>> {
// This test should auto fail due to how clap works
Command::new("./target/debug/rustop")