feat: reorganize workbook into 3 tracks (core, engineering-2026, ecosystems)

This commit is contained in:
soda64 committed 2026-11-30 22:30:53 +01:00
1 parent 82677455b2
commit 2e002b6176
64 files changed
+2295 -196

No files matched your search

@@ -0,0 +1,40 @@
#![allow(unused_variables, dead_code)]
use std::path::{Path, PathBuf};
pub fn config_file_path(base_dir: &Path, app_name: &str) -> PathBuf {
todo!("Użyj base_dir.join(app_name).join(\"config.toml\")")
}
pub fn current_os_label() -> &'static str {
todo!("Użyj #[cfg(target_os = \"...\")] dla linux, macos, windows oraz fallback other")
}
pub fn has_extension(path: &Path, expected: &str) -> bool {
todo!("Porównaj path.extension() z expected bez wrażliwości na wielkość liter")
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn builds_portable_config_path() {
let base = Path::new("home").join("user");
let expected = base.join("myapp").join("config.toml");
assert_eq!(config_file_path(&base, "myapp"), expected);
}
#[test]
fn detects_known_os_label() {
let label = current_os_label();
assert!(matches!(label, "linux" | "macos" | "windows" | "other"));
}
#[test]
fn checks_extensions_case_insensitively() {
assert!(has_extension(Path::new("notes.MD"), "md"));
assert!(has_extension(Path::new("archive.tar.gz"), "gz"));
assert!(!has_extension(Path::new("README"), "md"));
}
}