summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/version.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/version.rs b/tests/version.rs
index ef58601..af244db 100644
--- a/tests/version.rs
+++ b/tests/version.rs
@@ -69,3 +69,30 @@ fn the_hello_reply_round_trips() {
69 assert!(parse_hello("PONG").is_none()); 69 assert!(parse_hello("PONG").is_none());
70 assert!(parse_hello("HELLO").is_none()); 70 assert!(parse_hello("HELLO").is_none());
71} 71}
72
73/// The GUI is a client, so it must ship in lockstep with the TUI and server.
74/// Keep `gui/Cargo.toml` at the same version as the root package.
75#[test]
76fn the_gui_member_uses_the_same_version() {
77 let gui_manifest = include_str!("../gui/Cargo.toml");
78 let gui_version = gui_manifest
79 .lines()
80 .find_map(|line| line.trim().strip_prefix("version = "))
81 .expect("gui/Cargo.toml declares a version")
82 .trim_matches('"');
83 assert_eq!(gui_version, VERSION);
84}
85
86/// egui's dependency tree must never enter the TUI or server build graph.
87/// The GUI is a workspace member that depends on this package, never the
88/// other way round.
89#[test]
90fn the_root_package_does_not_depend_on_the_gui() {
91 let manifest = include_str!("../Cargo.toml");
92 for forbidden in ["eframe", "egui"] {
93 assert!(
94 !manifest.contains(forbidden),
95 "the root package must not depend on {forbidden}"
96 );
97 }
98}