Fix test involving config file for sorting

This commit is contained in:
Abin Simon 2021-02-15 10:46:03 +05:30
parent 7fad205682
commit 22f5a6b992
3 changed files with 10 additions and 2 deletions

View file

@ -13,8 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Not showing `.` and `..` when `--tree` with `--all` from [zwpaper](https://github.com/zwpaper) [#477](https://github.com/Peltoche/lsd/issues/477)
### Fixed
- Fix handling blocks passed without -l in cli from [meain](https://github.com/meain)
- Fixed sorting of . and .. when used with folder from [meain](https://github.com/meain)
- Fix sorting of . and .. when used with folder from [meain](https://github.com/meain)
- Fix arg parsing for flags that allow multiple values from [meain](https://github.com/meain)
- Fix tests involving config file for sorting from [meain](https://github.com/meain)
## [0.19.0] - 2020-12-13
### Added

View file

@ -275,6 +275,13 @@ total-size: false
symlink-arrow:
"#;
#[cfg(test)]
impl Config {
pub fn builtin() -> Self {
Self::from_yaml(DEFAULT_CONFIG).unwrap()
}
}
#[cfg(test)]
mod tests {
use super::Config;

View file

@ -417,7 +417,7 @@ mod test_sort_order {
fn test_from_config_default_config() {
assert_eq!(
Some(SortOrder::default()),
SortOrder::from_config(&Config::default())
SortOrder::from_config(&Config::builtin())
);
}