pretty assert

This commit is contained in:
veeso
2021-05-06 21:57:04 +02:00
parent c0eb98c3f9
commit 892be42988
33 changed files with 101 additions and 1 deletions

View File

@@ -119,6 +119,7 @@ impl std::fmt::Display for SerializerError {
mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_bookmarks_bookmark_new() {

View File

@@ -91,6 +91,7 @@ mod tests {
use super::super::Bookmark;
use super::*;
use pretty_assertions::assert_eq;
use std::collections::HashMap;
use std::io::{Seek, SeekFrom};

View File

@@ -163,6 +163,7 @@ impl std::fmt::Display for SerializerError {
mod tests {
use super::*;
use pretty_assertions::assert_eq;
use std::env;
#[test]

View File

@@ -90,6 +90,7 @@ mod tests {
use super::*;
use pretty_assertions::assert_eq;
use std::io::{Seek, SeekFrom};
use std::path::PathBuf;

View File

@@ -775,6 +775,8 @@ mod tests {
use super::*;
use crate::utils::fmt::fmt_time;
use pretty_assertions::assert_eq;
use std::time::Duration;
#[test]

View File

@@ -332,6 +332,7 @@ mod tests {
use super::*;
use pretty_assertions::assert_eq;
use std::str::FromStr;
use std::string::ToString;

View File

@@ -885,6 +885,7 @@ impl FileTransfer for ScpFileTransfer {
mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_filetransfer_scp_new() {

View File

@@ -702,6 +702,8 @@ mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_filetransfer_sftp_new() {
let client: SftpFileTransfer = SftpFileTransfer::new(SshKeyStorage::empty());

View File

@@ -117,6 +117,8 @@ mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_fs_explorer_builder_new_default() {
let explorer: FileExplorer = FileExplorerBuilder::new().build();

View File

@@ -539,6 +539,8 @@ mod tests {
use super::*;
use crate::fs::{FsDirectory, FsFile};
use pretty_assertions::assert_eq;
use std::path::PathBuf;
use std::time::SystemTime;

View File

@@ -361,6 +361,7 @@ mod tests {
use crate::fs::{FsDirectory, FsFile};
use crate::utils::fmt::fmt_time;
use pretty_assertions::assert_eq;
use std::thread::sleep;
use std::time::{Duration, SystemTime};

View File

@@ -232,6 +232,7 @@ impl FsEntry {
mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_fs_fsentry_dir() {

View File

@@ -739,6 +739,8 @@ impl Localhost {
mod tests {
use super::*;
use pretty_assertions::assert_eq;
use std::fs::File;
use std::io::Write;

View File

@@ -372,6 +372,8 @@ impl BookmarksClient {
mod tests {
use super::*;
use pretty_assertions::assert_eq;
use std::thread::sleep;
use std::time::Duration;

View File

@@ -381,6 +381,7 @@ mod tests {
use crate::config::UserConfig;
use crate::utils::random::random_alphanumeric_with_len;
use pretty_assertions::assert_eq;
use std::io::Read;
#[test]

View File

@@ -92,6 +92,7 @@ mod tests {
use super::*;
use pretty_assertions::assert_eq;
use std::fs::{File, OpenOptions};
use std::io::Write;

View File

@@ -125,6 +125,8 @@ mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_system_keys_filestorage_make_dir() {
let storage: FileStorage = FileStorage::new(&Path::new("/tmp/"));

View File

@@ -104,6 +104,7 @@ mod tests {
extern crate whoami;
use super::*;
use pretty_assertions::assert_eq;
use whoami::username;
#[test]

View File

@@ -78,6 +78,8 @@ mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_system_keys_mod_errors() {
assert_eq!(

View File

@@ -88,8 +88,9 @@ impl SshKeyStorage {
mod tests {
use super::*;
use crate::system::config_client::ConfigClient;
use pretty_assertions::assert_eq;
use std::path::Path;
#[test]

View File

@@ -333,6 +333,8 @@ impl Component for BookmarkList {
mod tests {
use super::*;
use pretty_assertions::assert_eq;
use tuirealm::event::KeyEvent;
#[test]

View File

@@ -345,6 +345,8 @@ impl Component for FileList {
mod tests {
use super::*;
use pretty_assertions::assert_eq;
use tuirealm::event::KeyEvent;
#[test]

View File

@@ -297,6 +297,8 @@ impl Component for LogBox {
mod tests {
use super::*;
use pretty_assertions::assert_eq;
use tuirealm::event::{KeyCode, KeyEvent};
use tuirealm::props::{TableBuilder, TextSpan};
use tuirealm::tui::style::Color;

View File

@@ -210,6 +210,8 @@ impl Component for MsgBox {
mod tests {
use super::*;
use pretty_assertions::assert_eq;
use tuirealm::event::{KeyCode, KeyEvent};
use tuirealm::props::{TextSpan, TextSpanBuilder};
use tuirealm::tui::style::Color;

View File

@@ -163,6 +163,8 @@ impl Default for FileTransferParams {
mod tests {
use super::*;
use pretty_assertions::assert_eq;
use std::path::PathBuf;
#[test]

View File

@@ -175,6 +175,8 @@ mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_ui_store() {
// Create store

View File

@@ -52,6 +52,8 @@ mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_utils_crypto_aes128() {
let key: &str = "MYSUPERSECRETKEY";

View File

@@ -157,6 +157,8 @@ mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_utils_fmt_pex() {
assert_eq!(fmt_pex(7, 7, 7), String::from("rwxrwxrwx"));

View File

@@ -233,6 +233,8 @@ mod tests {
use super::*;
use crate::utils::fmt::fmt_time;
use pretty_assertions::assert_eq;
#[test]
fn test_utils_parse_remote_opt() {
// Base case

View File

@@ -47,6 +47,8 @@ mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_utils_random_alphanumeric_with_len() {
assert_eq!(random_alphanumeric_with_len(256).len(), 256);

View File

@@ -60,6 +60,8 @@ mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_utils_ui_draw_area_in() {
let area: Rect = Rect::new(0, 0, 1024, 512);