i3status/testcases/025-file-contents/i3status.conf
Sam Newbold 300b31b2df
print_file_contents: allocate enough to include \0
related to #331
Previously, if max_chars was read, the null byte would be written
past the end of buf.
2019-06-10 16:36:18 +02:00

21 lines
408 B
Plaintext

general {
output_format = "none"
}
order += "read_file EXISTING"
order += "read_file TRUNCATED"
order += "read_file NONEXISTANT"
read_file EXISTING {
path = "testcases/025-file-contents/short.txt"
}
read_file TRUNCATED {
path = "testcases/025-file-contents/short.txt"
max_characters = 3
}
read_file NONEXISTANT {
path = "testcases/025-file-contents/nonexistant"
}