forked from scuptio/sedeve-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sedeve-kit, remove unused dependencies
- Loading branch information
Showing
24 changed files
with
251 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#[cfg(test)] | ||
mod tests { | ||
mod test { | ||
use serde_json::Value; | ||
|
||
use crate::action::constant; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
#[cfg(test)] | ||
pub mod test { | ||
use log::error; | ||
pub mod _test { | ||
use std::path::Path; | ||
|
||
use project_root::get_project_root; | ||
use scupt_util::error_type::ET; | ||
use scupt_util::res::Res; | ||
use scupt_util::res_of::res_io; | ||
|
||
pub fn test_data_path(file_name: String) -> Res<String> { | ||
let mut path_buf = res_io(get_project_root())?; | ||
pub fn _test_data_path(file_name: String) -> String { | ||
let mut path_buf = res_io(get_project_root()).unwrap(); | ||
path_buf = path_buf | ||
.join("src/data") | ||
.join(file_name); | ||
let s = match path_buf.as_path().to_str() { | ||
Some(s) => s.to_string(), | ||
None => { | ||
error!("build path error"); | ||
return Err(ET::NoneOption); | ||
} | ||
}; | ||
Ok(s) | ||
let s = path_buf.as_path().to_str().unwrap().to_string(); | ||
if !Path::new(&s).exists() { | ||
panic!("no exist such file {}", s); | ||
} | ||
s | ||
} | ||
|
||
#[test] | ||
#[should_panic] | ||
fn _test_non_exist_data_file() { | ||
let _s = _test_data_path("file.non_exist_data_file_name".to_string()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.