Skip to content

Commit 5cdaa45

Browse files
committed
Add test
Signed-off-by: Nico Burns <[email protected]>
1 parent c94000b commit 5cdaa45

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

parley/src/tests/test_basic.rs

+36
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,42 @@ fn full_width_inbox() {
9696
}
9797
}
9898

99+
#[test]
100+
fn inboxes_separated_by_whitespace() {
101+
let mut env = testenv!();
102+
103+
let text = " ";
104+
let mut builder = env.ranged_builder(text);
105+
builder.push_inline_box(InlineBox {
106+
id: 0,
107+
index: 0,
108+
width: 10.,
109+
height: 10.0,
110+
});
111+
builder.push_inline_box(InlineBox {
112+
id: 1,
113+
index: 1,
114+
width: 10.0,
115+
height: 10.0,
116+
});
117+
builder.push_inline_box(InlineBox {
118+
id: 2,
119+
index: 2,
120+
width: 10.0,
121+
height: 10.0,
122+
});
123+
builder.push_inline_box(InlineBox {
124+
id: 3,
125+
index: 3,
126+
width: 10.0,
127+
height: 10.0,
128+
});
129+
let mut layout = builder.build(text);
130+
layout.break_all_lines(Some(100.));
131+
layout.align(None, Alignment::Start, AlignmentOptions::default());
132+
env.check_layout_snapshot(&layout);
133+
}
134+
99135
#[test]
100136
fn trailing_whitespace() {
101137
let mut env = testenv!();
Loading

0 commit comments

Comments
 (0)