| skipped 466 lines |
467 | 467 | | }); |
468 | 468 | | |
469 | 469 | | temp_env::with_var("FORCE_COLOR", Some("1"), || { |
470 | | - | assert_eq!( |
471 | | - | color(" testing ", Colors::Rgb(Rgb::Val(243, 79, 168))), |
472 | | - | String::from("\u{1b}[91m testing \u{1b}[39m") |
473 | | - | ); |
| 470 | + | assert_eq!(color(" testing ", Colors::Rgb(Rgb::Val(243, 79, 168))), String::from("\x1B[91m testing \x1B[39m")); |
474 | 471 | | }); |
475 | 472 | | |
476 | 473 | | temp_env::with_var("FORCE_COLOR", Some("2"), || { |
477 | 474 | | assert_eq!( |
478 | 475 | | color(" testing ", Colors::Rgb(Rgb::Val(243, 79, 168))), |
479 | | - | String::from("\u{1b}[38;5;211m testing \u{1b}[39m") |
| 476 | + | String::from("\x1B[38;5;211m testing \x1B[39m") |
480 | 477 | | ); |
481 | 478 | | }); |
482 | 479 | | |
483 | 480 | | temp_env::with_var("FORCE_COLOR", Some("3"), || { |
484 | 481 | | assert_eq!( |
485 | 482 | | color(" testing ", Colors::Rgb(Rgb::Val(243, 79, 168))), |
486 | | - | String::from("\u{1b}[38;2;243;79;168m testing \u{1b}[39m") |
| 483 | + | String::from("\x1B[38;2;243;79;168m testing \x1B[39m") |
487 | 484 | | ); |
488 | 485 | | }); |
489 | 486 | | } |
| skipped 7 lines |
497 | 494 | | temp_env::with_var("FORCE_COLOR", Some("1"), || { |
498 | 495 | | assert_eq!( |
499 | 496 | | bg_color(" testing ", BgColors::Rgb(Rgb::Val(243, 79, 168))), |
500 | | - | String::from("\u{1b}[101m testing \u{1b}[49m") |
| 497 | + | String::from("\x1B[101m testing \x1B[49m") |
501 | 498 | | ); |
502 | 499 | | }); |
503 | 500 | | |
504 | 501 | | temp_env::with_var("FORCE_COLOR", Some("2"), || { |
505 | 502 | | assert_eq!( |
506 | 503 | | bg_color(" testing ", BgColors::Rgb(Rgb::Val(243, 79, 168))), |
507 | | - | String::from("\u{1b}[48;5;211m testing \u{1b}[49m") |
| 504 | + | String::from("\x1B[48;5;211m testing \x1B[49m") |
508 | 505 | | ); |
509 | 506 | | }); |
510 | 507 | | |
511 | 508 | | temp_env::with_var("FORCE_COLOR", Some("3"), || { |
512 | 509 | | assert_eq!( |
513 | 510 | | bg_color(" testing ", BgColors::Rgb(Rgb::Val(243, 79, 168))), |
514 | | - | String::from("\u{1b}[48;2;243;79;168m testing \u{1b}[49m") |
| 511 | + | String::from("\x1B[48;2;243;79;168m testing \x1B[49m") |
515 | 512 | | ); |
516 | 513 | | }); |
517 | 514 | | } |
| skipped 5 lines |
523 | 520 | | }); |
524 | 521 | | |
525 | 522 | | temp_env::with_vars(vec![("FORCE_COLOR", Some("1")), ("NO_COLOR", Some(""))], || { |
526 | | - | assert_eq!( |
527 | | - | color(" testing ", Colors::Rgb(Rgb::Val(243, 79, 168))), |
528 | | - | String::from("\u{1b}[91m testing \u{1b}[39m") |
529 | | - | ); |
| 523 | + | assert_eq!(color(" testing ", Colors::Rgb(Rgb::Val(243, 79, 168))), String::from("\x1B[91m testing \x1B[39m")); |
530 | 524 | | }); |
531 | 525 | | |
532 | 526 | | temp_env::with_vars(vec![("FORCE_COLOR", Some("2")), ("NO_COLOR", Some(""))], || { |
533 | 527 | | assert_eq!( |
534 | 528 | | color(" testing ", Colors::Rgb(Rgb::Val(243, 79, 168))), |
535 | | - | String::from("\u{1b}[38;5;211m testing \u{1b}[39m") |
| 529 | + | String::from("\x1B[38;5;211m testing \x1B[39m") |
536 | 530 | | ); |
537 | 531 | | }); |
538 | 532 | | |
539 | 533 | | temp_env::with_vars(vec![("FORCE_COLOR", Some("3")), ("NO_COLOR", Some(""))], || { |
540 | 534 | | assert_eq!( |
541 | 535 | | color(" testing ", Colors::Rgb(Rgb::Val(243, 79, 168))), |
542 | | - | String::from("\u{1b}[38;2;243;79;168m testing \u{1b}[39m") |
| 536 | + | String::from("\x1B[38;2;243;79;168m testing \x1B[39m") |
543 | 537 | | ); |
544 | 538 | | }); |
545 | 539 | | } |
| skipped 7 lines |
553 | 547 | | temp_env::with_vars(vec![("FORCE_COLOR", Some("1")), ("NO_COLOR", Some(""))], || { |
554 | 548 | | assert_eq!( |
555 | 549 | | bg_color(" testing ", BgColors::Rgb(Rgb::Val(243, 79, 168))), |
556 | | - | String::from("\u{1b}[101m testing \u{1b}[49m") |
| 550 | + | String::from("\x1B[101m testing \x1B[49m") |
557 | 551 | | ); |
558 | 552 | | }); |
559 | 553 | | |
560 | 554 | | temp_env::with_vars(vec![("FORCE_COLOR", Some("2")), ("NO_COLOR", Some(""))], || { |
561 | 555 | | assert_eq!( |
562 | 556 | | bg_color(" testing ", BgColors::Rgb(Rgb::Val(243, 79, 168))), |
563 | | - | String::from("\u{1b}[48;5;211m testing \u{1b}[49m") |
| 557 | + | String::from("\x1B[48;5;211m testing \x1B[49m") |
564 | 558 | | ); |
565 | 559 | | }); |
566 | 560 | | |
567 | 561 | | temp_env::with_vars(vec![("FORCE_COLOR", Some("3")), ("NO_COLOR", Some(""))], || { |
568 | 562 | | assert_eq!( |
569 | 563 | | bg_color(" testing ", BgColors::Rgb(Rgb::Val(243, 79, 168))), |
570 | | - | String::from("\u{1b}[48;2;243;79;168m testing \u{1b}[49m") |
| 564 | + | String::from("\x1B[48;2;243;79;168m testing \x1B[49m") |
571 | 565 | | ); |
572 | 566 | | }); |
573 | 567 | | } |
| skipped 2 lines |