diff options
author | Cyril Plisko <cyril.plisko@mountall.com> | 2017-09-06 09:24:54 +0300 |
---|---|---|
committer | Cyril Plisko <cyril.plisko@mountall.com> | 2017-09-06 09:27:24 +0300 |
commit | e28cfc2ef091605014a6d4da32fd673637d10dd8 (patch) | |
tree | 8e44b974b1db20160720b56ac700b7e500383e6e /tests | |
parent | 0fa1139697c7307fc53a2ce8be42ce2c5947de3f (diff) |
Add Pager::skip_on_notty()
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pager.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/pager.rs b/tests/pager.rs index d43909a..b9ca62f 100644 --- a/tests/pager.rs +++ b/tests/pager.rs @@ -12,3 +12,10 @@ fn nopager() { env::remove_var("NOPAGER"); assert!(!pager.is_on()); } + +#[test] +fn notty() { + let mut pager = Pager::new().skip_on_notty(); + pager.setup(); + assert!(!pager.is_on()); +} |