blob: 0188de75848b9641d0af27acdb302a0a6e531f51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
use ansi_term::Style;
use crate::output::cell::TextCell;
use crate::fs::fields as f;
impl f::Inode {
pub fn render(self, style: Style) -> TextCell {
TextCell::paint(style, self.0.to_string())
}
}
#[cfg(test)]
pub mod test {
use crate::output::cell::TextCell;
use crate::fs::fields as f;
use ansi_term::Colour::*;
#[test]
fn blocklessness() {
let io = f::Inode(1414213);
let expected = TextCell::paint_str(Cyan.underline(), "1414213");
assert_eq!(expected, io.render(Cyan.underline()).into());
}
}
|