MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / strip_tests

Function strip_tests

atomic-cli/tests/it/workspace_txn_routing_cb5c_test.rs:112–120  ·  view source on GitHub ↗
(contents: &str)

Source from the content-addressed store, hash-verified

110}
111
112fn strip_tests(contents: &str) -> String {
113 // Windows checkouts may use CRLF; strip the test module on either platform.
114 let contents = contents.replace("\r\n", "\n");
115 contents
116 .split("\n#[cfg(test)]\nmod tests")
117 .next()
118 .unwrap_or(&contents)
119 .to_string()
120}
121
122fn token_present(source: &str, token: &str) -> bool {
123 source.contains(token)

Callers 2

readFunction · 0.85

Calls 2

replaceMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected