1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#![warn(
missing_debug_implementations,
missing_copy_implementations,
trivial_casts,
unused_allocation,
trivial_numeric_casts
)]
#![forbid(unsafe_code)]
#[macro_use]
pub mod macros;
pub mod api;
pub mod cli;
pub mod config;
pub mod context;
pub mod error;
pub mod fs;
pub mod log;
pub mod ops;
pub mod printer;
pub use crate::{
cli::Seaplane, config::RawConfig, context::Ctx, error::Result, log::LogLevel,
printer::OutputFormat,
};
#[cfg(any(feature = "ui_tests", feature = "semantic_ui_tests", feature = "api_tests"))]
mod tests {
use std::ffi::OsString;
use clap::{error::Error as ClapError, ArgMatches};
use super::Seaplane;
pub fn test_run<I, T>(argv: I) -> Result<ArgMatches, ClapError>
where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
{
Seaplane::command().try_get_matches_from(argv)
}
}
#[cfg(any(feature = "ui_tests", feature = "semantic_ui_tests", feature = "api_tests"))]
pub use tests::test_run;