From 1797cad1825d2fd1932b2b3f2369d111bae28789 Mon Sep 17 00:00:00 2001 From: Fadi Hanna Al-Kass Date: Mon, 30 Jun 2025 16:08:57 -0700 Subject: [PATCH 1/2] Fix script and update edition --- Cargo.toml | 1 + makefile | 2 +- scripts/test.sh | 10 ++++++---- src/lib.rs | 4 ---- src/test_case.rs | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index df70757..18e8387 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "polish" description = "Test-Driven Development done right" version = "0.9.9" +edition = "2021" authors = ["Fadi Hanna Al-Kass"] documentation = "https://docs.rs/polish" homepage = "https://github.com/AlKass/polish" diff --git a/makefile b/makefile index 49dff95..234c540 100644 --- a/makefile +++ b/makefile @@ -1,2 +1,2 @@ test: - . scripts/test.sh + bash scripts/test.sh diff --git a/scripts/test.sh b/scripts/test.sh index 250c930..3324bb8 100644 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,11 +1,13 @@ +#!/usr/bin/env bash + for example in examples/*.rs; do - echo $example - cp $example src/main.rs + echo "$example" + cp "$example" src/main.rs cargo run rv=$? if [ $rv -ne 0 ]; then - echo returning $rv - return $rv + echo "returning $rv" + exit $rv fi done rm src/main.rs diff --git a/src/lib.rs b/src/lib.rs index 962cfb6..0799bd7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,2 @@ -extern crate chrono; -extern crate ansi_term; -extern crate time; - pub mod logger; pub mod test_case; diff --git a/src/test_case.rs b/src/test_case.rs index cdc317d..864dd7a 100644 --- a/src/test_case.rs +++ b/src/test_case.rs @@ -2,7 +2,7 @@ use time::OffsetDateTime; use chrono::prelude::Local; use ansi_term::Colour; use ansi_term::Colour::{Green, Red, Yellow}; -use logger::Logger; +use crate::logger::Logger; #[derive(PartialEq, Clone)] pub enum TestCaseStatus { From 08f6edb9f86c53634c7b18eac5aa6c5ee86188dd Mon Sep 17 00:00:00 2001 From: Fadi Hanna Al-Kass Date: Mon, 30 Jun 2025 16:13:22 -0700 Subject: [PATCH 2/2] Fix makefile tab indentation --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 234c540..b454a86 100644 --- a/makefile +++ b/makefile @@ -1,2 +1,2 @@ test: - bash scripts/test.sh + bash scripts/test.sh