1
use crate::utils::{expand_tilde, zfill};
2
use std::env;
3

            
4
#[test]
5
2
fn test_zfill() {
6
1
    assert_eq!(zfill("7", "0", 3), "007");
7
1
    assert_eq!(zfill("7", "0", 0), "");
8
1
    assert_eq!(zfill("7", "1", 1), "7");
9
2
}
10

            
11
#[test]
12
2
fn test_expand_tilde() {
13
1
    assert_eq!(expand_tilde("~/code"), format!("{}/code", env!("HOME")));
14
1
    assert_eq!(expand_tilde("/~code"), "/~code");
15
2
}