Parcourir la source

Fix color tests

Sam Clements il y a 3 ans
Parent
commit
784089ecda
2 fichiers modifiés avec 8 ajouts et 3 suppressions
  1. 5 0
      .github/workflows/ci.yml
  2. 3 3
      src/lib.rs

+ 5 - 0
.github/workflows/ci.yml

@@ -48,6 +48,11 @@ jobs:
           toolchain: ${{ matrix.toolchain }}
           profile: minimal
 
+      - run: cargo +${{ matrix.toolchain }} build --all-features
+      - run: cargo +${{ matrix.toolchain }} build --no-default-features
+      - run: cargo +${{ matrix.toolchain }} build --no-default-features --features colors
+      - run: cargo +${{ matrix.toolchain }} build --no-default-features --features timestamps
+
       - run: cargo +${{ matrix.toolchain }} test --all-features
       - run: cargo +${{ matrix.toolchain }} test --no-default-features
       - run: cargo +${{ matrix.toolchain }} test --no-default-features --features colors

+ 3 - 3
src/lib.rs

@@ -437,12 +437,12 @@ mod test {
 
     #[test]
     #[cfg(feature = "color")]
-    fn test_with_timestamps() {
+    fn test_with_colors() {
         let mut builder = SimpleLogger::new();
-        assert!(builder.color == true);
+        assert!(builder.colors == true);
 
         builder = builder.with_colors(false);
-        assert!(builder.color == false);
+        assert!(builder.colors == false);
 
         builder.init().unwrap();
     }