|
|
|
@ -70,11 +70,13 @@ mod tests {
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn test_speech_dispatcher_socket() -> std::io::Result<()> {
|
|
|
|
|
let socket_path = super::speech_dispatcher_socket()?;
|
|
|
|
|
assert!(socket_path
|
|
|
|
|
.to_str()
|
|
|
|
|
.unwrap()
|
|
|
|
|
.ends_with("/speech-dispatcher/speechd.sock"));
|
|
|
|
|
if std::env::var("XDG_RUNTIME_DIR").is_ok() {
|
|
|
|
|
let socket_path = super::speech_dispatcher_socket()?;
|
|
|
|
|
assert!(socket_path
|
|
|
|
|
.to_str()
|
|
|
|
|
.unwrap()
|
|
|
|
|
.ends_with("/speech-dispatcher/speechd.sock"));
|
|
|
|
|
}
|
|
|
|
|
Ok(())
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|