1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-02 11:22:30 +01:00

Merge pull request #1440 from Enselic/fix-1438-newline-can-be-added-even-if-style-plain

Don't add artificial newline to last line if --style=plain
This commit is contained in:
David Peter
2020-12-21 09:24:26 +01:00
committed by GitHub
19 changed files with 31 additions and 19 deletions

View File

@@ -813,3 +813,17 @@ fn show_all_mode() {
.stdout("hello·world␊\n├──┤␍␀␇␈␛")
.stderr("");
}
#[test]
fn plain_mode_does_not_add_nonexisting_newline() {
bat()
.arg("--paging=never")
.arg("--color=never")
.arg("--decorations=always")
.arg("--style=plain")
.arg("single-line.txt")
.assert()
.success()
.stdout("Single Line");
}

View File

@@ -175,4 +175,4 @@
\u{ad}␊
\u{ae}␊
␊
Here's·a·line·with·multiple·characters.
Here's·a·line·with·multiple·characters.␊

View File

@@ -72,4 +72,4 @@ package TestSyntax {
var sndChannel:SoundChannel = mySound.play();
}
}
}
}

View File

@@ -56,4 +56,4 @@ set LDLIBS= ^
@set "LINK_FILES=%LINK_FILES% %%~f"
)
lld-link.exe %LINK_FILES% -out:"%OUTPUT%" %LDFLAGS% %LDLIBS%
lld-link.exe %LINK_FILES% -out:"%OUTPUT%" %LDFLAGS% %LDLIBS%

View File

@@ -55,4 +55,4 @@
(println (factorial 5))
(log)
(log "Message"))

View File

@@ -16,4 +16,4 @@ EXPOSE 80/tcp
VOLUME [/var/lib/mysql/data]
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
ENTRYPOINT ["/usr/bin/entrypoint.sh"]

View File

@@ -13,4 +13,4 @@
*.patch -text
.gitattributes linguist-language=gitattributes
.gitkeep export-ignore
.gitkeep export-ignore

View File

@@ -104,4 +104,4 @@
[user]
email = f.nord@example.com
name = Frank Nord
signingkey = AAAAAAAAAAAAAAAA
signingkey = AAAAAAAAAAAAAAAA

View File

@@ -5,4 +5,4 @@
192.160.0.200 try.sample.test try #another comment
216.58.223.238 google.com
::1 localhost.try ip6-localhost
::1 localhost.try ip6-localhost

View File

@@ -382,4 +382,4 @@ install: all
@ln -sf $(REDIS_SERVER_NAME) $(INSTALL_BIN)/$(REDIS_SENTINEL_NAME)
uninstall:
rm -f $(INSTALL_BIN)/{$(REDIS_SERVER_NAME),$(REDIS_BENCHMARK_NAME),$(REDIS_CLI_NAME),$(REDIS_CHECK_RDB_NAME),$(REDIS_CHECK_AOF_NAME),$(REDIS_SENTINEL_NAME)}
rm -f $(INSTALL_BIN)/{$(REDIS_SERVER_NAME),$(REDIS_BENCHMARK_NAME),$(REDIS_CLI_NAME),$(REDIS_CHECK_RDB_NAME),$(REDIS_CHECK_AOF_NAME),$(REDIS_SENTINEL_NAME)}

View File

@@ -108,4 +108,4 @@ $doe->setName('John Doe');
$ending = 2 > 3 ? "yep" : "nah";
?>
?>

View File

@@ -5,4 +5,4 @@ pywheels>=12.4 #a whitespace followed by comments
Nuitka<0.6.8.4
wxPython>=1.0, <=2.1
#this is another comment
#this is another comment

View File

@@ -31,4 +31,4 @@ emails:
- bob@example.com
- bill@example.com
supervisors:
- george@example.com
- george@example.com

View File

@@ -317,4 +317,4 @@ blank lines before and after.)
..
So this block is not "lost",
despite its indentation.
despite its indentation.