devloop guard test: skip its own module
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e84470a95d
commit
098b985bce
1 changed files with 4 additions and 1 deletions
|
|
@ -30,6 +30,7 @@
|
|||
//! feature flags, as validated data and the scripts that hand them to site tabs.
|
||||
//! - [`modes`]: the onboarding mode the owner started from (the presets are the app's feature table).
|
||||
//! - [`zoom`]: page zoom per tab (a clamped factor the shell sets, remembered in `zoom.json`).
|
||||
//! - [`find`]: find in page (the request the shell sends, the fallback script; the query is kept nowhere).
|
||||
//! - [`alerts`]: local keyword alerts (keywords, snippets, per-item/per-keyword rate limits).
|
||||
//! - [`media`]: gallery folders (path containment) and the opt-in clipboard history (private copies skipped).
|
||||
//! - [`gfonts`]: self-hosted Google Fonts: CSS parsing, URL/woff2 checks, the cache format, the page script;
|
||||
|
|
@ -52,6 +53,7 @@ pub mod backup;
|
|||
pub mod bridge;
|
||||
pub mod commands;
|
||||
pub mod devmode;
|
||||
pub mod find;
|
||||
#[cfg(feature = "net")]
|
||||
pub mod fonts;
|
||||
pub mod gfonts;
|
||||
|
|
@ -109,7 +111,8 @@ mod release_guard {
|
|||
#[test]
|
||||
fn every_devloop_mention_is_debug_only() {
|
||||
for (file, source) in [("lib.rs", include_str!("lib.rs")), ("app.rs", include_str!("app.rs"))] {
|
||||
let lines: Vec<&str> = source.lines().collect();
|
||||
// This test module itself talks about the dev loop; only the code before it counts.
|
||||
let lines: Vec<&str> = source.split("mod release_guard").next().unwrap_or(source).lines().collect();
|
||||
for (index, line) in lines.iter().enumerate() {
|
||||
let code = line.trim_start();
|
||||
if code.starts_with("//") || !(code.contains("devloop::") || code.starts_with("pub mod devloop")) || code.contains("$crate::devloop") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue