mirror of
https://github.com/oxalica/nil.git
synced 2024-11-22 02:55:39 +03:00
Remove trailing spaces in tests
This commit is contained in:
parent
b4a01cee32
commit
1b6b4534b3
@ -144,7 +144,7 @@ mod tests {
|
||||
${g} = 3;
|
||||
};
|
||||
}
|
||||
",
|
||||
",
|
||||
expect![[r#"
|
||||
{
|
||||
|
||||
|
@ -316,7 +316,7 @@ rec {
|
||||
foo = rec { };
|
||||
$0foo = { a = 42; };
|
||||
}
|
||||
",
|
||||
",
|
||||
expect![[r#"
|
||||
{
|
||||
foo = rec {
|
||||
@ -343,7 +343,7 @@ rec {
|
||||
d = 3;
|
||||
};
|
||||
}
|
||||
",
|
||||
",
|
||||
expect![[r#"
|
||||
{
|
||||
foo = {
|
||||
|
@ -796,7 +796,7 @@ mod tests {
|
||||
inputs.nixpkgs.url = "...";
|
||||
outputs = { n$0 }: { };
|
||||
}
|
||||
"#,
|
||||
"#,
|
||||
"nixpkgs",
|
||||
expect![[r#"
|
||||
(Param) {
|
||||
@ -815,7 +815,7 @@ mod tests {
|
||||
{
|
||||
nix.e$0
|
||||
}
|
||||
",
|
||||
",
|
||||
"enable",
|
||||
expect![[r#"
|
||||
(Field) { ... }:
|
||||
@ -830,7 +830,7 @@ mod tests {
|
||||
{
|
||||
notexists.e$0
|
||||
}
|
||||
",
|
||||
",
|
||||
"enable",
|
||||
);
|
||||
check_no(
|
||||
@ -839,7 +839,7 @@ mod tests {
|
||||
stdenv.mkDerivation {
|
||||
nix.e$0
|
||||
}
|
||||
",
|
||||
",
|
||||
"enable",
|
||||
);
|
||||
}
|
||||
|
@ -182,7 +182,9 @@ impl Fixture {
|
||||
|
||||
fn insert_file(&mut self, path: VfsPath, mut text: String) -> Result<()> {
|
||||
let file = FileId(self.files.len() as u32);
|
||||
text.truncate(text.trim_end().len());
|
||||
// Trim the last newline for simplicity. But whitespaces are kept since markers may be
|
||||
// pointing to them.
|
||||
text.truncate(text.trim_end_matches('\n').len());
|
||||
ensure!(
|
||||
self.files.insert(path.clone(), text).is_none(),
|
||||
"Duplicated path: {:?}",
|
||||
|
Loading…
Reference in New Issue
Block a user