config: add TestConfig
This commit is contained in:
parent
f92c9c6027
commit
e212e0b8b1
7 changed files with 175 additions and 6 deletions
|
|
@ -5,6 +5,7 @@ use {
|
|||
backend::{ConnectorId, InputDeviceId},
|
||||
config::handler::ConfigProxyHandler,
|
||||
ifs::wl_seat::SeatId,
|
||||
it::test_config::TEST_CONFIG_ENTRY,
|
||||
state::State,
|
||||
utils::{
|
||||
clonecell::CloneCell, numcell::NumCell, oserror::OsError, ptr_ext::PtrExt,
|
||||
|
|
@ -180,6 +181,11 @@ impl ConfigProxy {
|
|||
Self::new(None, &entry, state)
|
||||
}
|
||||
|
||||
#[cfg(feature = "it")]
|
||||
pub fn for_test(state: &Rc<State>) -> Self {
|
||||
Self::new(None, &TEST_CONFIG_ENTRY, state)
|
||||
}
|
||||
|
||||
pub fn from_config_dir(state: &Rc<State>) -> Result<Self, ConfigError> {
|
||||
let dir = match state.config_dir.as_deref() {
|
||||
Some(d) => d,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue