fn test_align_bottom()

in src/components/alignment.rs [323:355]


    fn test_align_bottom() {
        let mut state = State::new();
        let component = Aligned::new(
            Box::new(Echo::<Msg>::new(false)),
            HorizontalAlignmentKind::Left(false),
            VerticalAlignmentKind::Bottom,
        );
        let original = vec![
            vec!["hello world"].try_into().unwrap(),           // 11 chars
            vec!["pretty normal testsss"].try_into().unwrap(), // 21 chars
            vec!["shorts"].try_into().unwrap(),                // 6 chars
        ];
        let msg = Msg(original);
        state.insert(&msg);
        let dimensions = Dimensions::new(20, 10);
        let actual = component
            .draw(&state, dimensions, DrawMode::Normal)
            .unwrap();
        let expected = vec![
            Line::default(),
            Line::default(),
            Line::default(),
            Line::default(),
            Line::default(),
            Line::default(),
            Line::default(),
            vec!["hello world"].try_into().unwrap(),
            vec!["pretty normal testss"].try_into().unwrap(),
            vec!["shorts"].try_into().unwrap(),
        ];

        assert_eq!(actual, expected);
    }