Skip to content

Commit 692c976

Browse files
committed
add testing to the ci
1 parent 37396e0 commit 692c976

File tree

4 files changed

+44
-1
lines changed

4 files changed

+44
-1
lines changed

.github/workflows/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ jobs:
99
with:
1010
components: clippy
1111
- run: sudo apt-get install libudev-dev libseat-dev libdisplay-info-dev
12-
- run: cargo clippy --workspace -- -D warnings
12+
- name: build
13+
run: cargo clippy --workspace -- -D warnings
14+
# - name: test
15+
# run: cargo test --workspace
1316
fmt:
1417
runs-on: ubuntu-latest
1518
steps:

Cargo.lock

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mayland-config/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ smithay = { workspace = true, features = ["backend_libinput"] }
1919
thiserror = "2.0.12"
2020
tracing = "0.1.41"
2121

22+
[dev-dependencies]
23+
pretty_assertions = "1.4.1"
24+
2225
[lints]
2326
workspace = true

mayland-config/src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,17 @@ fn watcher(comp: CompMod) -> calloop::channel::Channel<Config> {
201201

202202
rx
203203
}
204+
205+
#[cfg(test)]
206+
mod test {
207+
use crate::Config;
208+
209+
const MAYLAND_MF: &str = include_str!("../../resources/mayland.mf");
210+
211+
#[test]
212+
fn default_config() {
213+
let mayland_mf = mayfig::from_str::<Config>(MAYLAND_MF).unwrap();
214+
let default = Config::default();
215+
pretty_assertions::assert_eq!(mayland_mf, default);
216+
}
217+
}

0 commit comments

Comments
 (0)