Skip to content

Commit 6646311

Browse files
committed
adding the version
1 parent a5017cb commit 6646311

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/runner.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ fn for_file_optimized(run_config: &RunConfig, file_path: &str) -> RunResult {
108108
}
109109
}
110110

111+
pub fn version() -> String {
112+
env!("CARGO_PKG_VERSION").to_string()
113+
}
114+
111115
pub fn for_team(run_config: &RunConfig, team_name: &str) -> RunResult {
112116
run_with_runner(run_config, |runner| runner.for_team(team_name))
113117
}
@@ -296,3 +300,13 @@ impl Runner {
296300
}
297301
}
298302
}
303+
304+
#[cfg(test)]
305+
mod tests {
306+
use super::*;
307+
308+
#[test]
309+
fn test_version() {
310+
assert_eq!(version(), env!("CARGO_PKG_VERSION").to_string());
311+
}
312+
}

0 commit comments

Comments
 (0)