11#![ cfg( not( feature = "no-color" ) ) ]
22#![ allow( unused_imports) ]
33
4- extern crate ansi_term ;
4+ extern crate ansiterm ;
55extern crate colored;
66
7- use ansi_term :: * ;
7+ use ansiterm :: * ;
88use colored:: * ;
99
1010macro_rules! test_simple_color {
11- ( $string: expr, $colored_name: ident, $ansi_term_name : ident) => {
11+ ( $string: expr, $colored_name: ident, $ansiterm_name : ident) => {
1212 #[ test]
1313 fn $colored_name( ) {
1414 let s = format!( "{} {}" , $string, stringify!( $colored_name) ) ;
1515 assert_eq!(
1616 s. $colored_name( ) . to_string( ) ,
17- Colour :: $ansi_term_name . paint( s) . to_string( )
17+ Colour :: $ansiterm_name . paint( s) . to_string( )
1818 )
1919 }
2020 } ;
2121}
2222
2323mod compat_colors {
24- use super :: ansi_term :: * ;
24+ use super :: ansiterm :: * ;
2525 use super :: colored:: * ;
2626
2727 test_simple_color ! ( "test string" , black, Black ) ;
@@ -35,14 +35,14 @@ mod compat_colors {
3535}
3636
3737macro_rules! test_simple_style {
38- ( $string: expr, $colored_style: ident, $ansi_term_style : ident) => {
38+ ( $string: expr, $colored_style: ident, $ansiterm_style : ident) => {
3939 #[ test]
4040 fn $colored_style( ) {
4141 let s = format!( "{} {}" , $string, stringify!( $colored_style) ) ;
4242 assert_eq!(
4343 s. $colored_style( ) . to_string( ) ,
44- ansi_term :: Style :: new( )
45- . $ansi_term_style ( )
44+ ansiterm :: Style :: new( )
45+ . $ansiterm_style ( )
4646 . paint( s)
4747 . to_string( )
4848 )
@@ -51,8 +51,8 @@ macro_rules! test_simple_style {
5151}
5252
5353mod compat_styles {
54- use super :: ansi_term ;
55- use super :: ansi_term :: * ;
54+ use super :: ansiterm ;
55+ use super :: ansiterm :: * ;
5656 use super :: colored;
5757 use super :: colored:: * ;
5858
@@ -66,14 +66,14 @@ mod compat_styles {
6666}
6767
6868macro_rules! test_simple_bgcolor {
69- ( $string: expr, $colored_name: ident, $ansi_term_name : ident) => {
69+ ( $string: expr, $colored_name: ident, $ansiterm_name : ident) => {
7070 #[ test]
7171 fn $colored_name( ) {
7272 let s = format!( "{} {}" , $string, stringify!( $colored_name) ) ;
7373 assert_eq!(
7474 s. $colored_name( ) . to_string( ) ,
75- ansi_term :: Style :: default ( )
76- . on( ansi_term :: Colour :: $ansi_term_name )
75+ ansiterm :: Style :: default ( )
76+ . on( ansiterm :: Colour :: $ansiterm_name )
7777 . paint( s)
7878 . to_string( )
7979 )
@@ -82,8 +82,8 @@ macro_rules! test_simple_bgcolor {
8282}
8383
8484mod compat_bgcolors {
85- use super :: ansi_term ;
86- use super :: ansi_term :: * ;
85+ use super :: ansiterm ;
86+ use super :: ansiterm :: * ;
8787 use super :: colored;
8888 use super :: colored:: * ;
8989
@@ -98,8 +98,8 @@ mod compat_bgcolors {
9898}
9999
100100mod compat_complex {
101- use super :: ansi_term ;
102- use super :: ansi_term :: * ;
101+ use super :: ansiterm ;
102+ use super :: ansiterm :: * ;
103103 use super :: colored;
104104 use super :: colored:: * ;
105105
@@ -125,8 +125,8 @@ mod compat_complex {
125125}
126126
127127mod compat_overrides {
128- use super :: ansi_term ;
129- use super :: ansi_term :: * ;
128+ use super :: ansiterm ;
129+ use super :: ansiterm :: * ;
130130 use super :: colored;
131131 use super :: colored:: * ;
132132
0 commit comments