filecheck(1)
β¨ filecheck(1) β bestie edition β¨
okay so like, welcome to the filecheck manual page π this is section 1 of the manual (iykyk), and we're about to have a whole moment together. grab a strawberry π, sit down, and let's get into it.
πΈ NAME πΈ
filecheck β it's literally an attempt to reimplement LLVM's FileCheck using Python πβ¨
π SYNOPSIS π
filecheck <check-file> [<options>]
likeβ¦ that's it. that's the whole vibe. one check file, some options, go off π
π DESCRIPTION π
so Filecheck is a Python implementation for LLVM LIT integration tests (yes, integration tests, they said it twice in the original and honestly? iconic of them, we're keeping that energy fr fr π).
ngl this package is so useful for people who are not familiar with the LLVM infrastructure, and also for Python-based projects that would simply prefer to not have to build anything from LLVM's source code in their CI process. no cap. you justβ¦ don't have to do all that ππ«Ά
β¨ OPTIONS β¨
--match-full-linesβ require all positive matches to cover an entire input line. it does allow leading and trailing whitespace, but only if--strict-whitespaceis not also passed. it's giving β¨conditional generosityβ¨--strict-whitespaceβ do not treat all horizontal whitespace as equivalent. the spaces are gonna matter now bestie, every single one π«£--check-prefixβ lets you change the default match keywordCHECKto literally any arbitrary keyword you want. your keyword, your rules π--implicit-check-notβ adds an implicitCHECK-NOTcheck that works on every input line. sneaky? no. effective? absolutely π₯--helpβ display available options. the classic. the main character. always there for you π
π EXAMPLES π
okay this is the fun part, let's actually see it.
take this check file named without--strict-whitespace.check:
CHECK: String1 String2 String3
it will pass on any of the following inputs:
printf "String1 String2 String3" | filecheck without--strict-whitespace.check
printf "String1 String2 String3" | filecheck without--strict-whitespace.check
printf " String1String2String3 " | filecheck without--strict-whitespace.check
because by default all that horizontal whitespace is treated as equivalent β it's giving chaos, it's giving flexible, it's giving slay π¦
adding --strict-whitespace disables this behavior. periodt. π«
now the other one. take this check file named without--match-full-lines.check:
CHECK: tring1
CHECK: ring2
CHECK: String3
it will pass on the following input:
printf "String110tring210tring3" | filecheck without--match-full-lines.check
(no because the way those matches just be living inside the other strings, unbothered, moisturized, in their lane ππ)
the --match-full-lines disables this behavior. so if you want your matches to cover the whole line, that's your flag, bestie π
π§ REPORTING BUGS π§
found a bug? don't be shy, tell on it π to report a bug please visit the filecheck issues tracking system at:
https://github.com/mull-project/FileCheck.py/issues
π AUTHORS π
this manual page was written by Bo YU <tsu.yubo@gmail.com> for the Debian project β but like, it may be used by others too, so don't gatekeep π
and that's the whole page, bestie!! πβ¨ this was FILECHECK 0.0.23, dated Oct 2023, brought to you by filecheck(1) β thanks for reading, ily, go write some passing tests ππ¦πΈπ
π¦ where this page comes from
- debian trixie: filecheck 0.0.24+dfsg-2 Β· Apache-2.0
- ubuntu noble: filecheck 0.0.23+dfsg-2 Β· Apache-2.0
- ubuntu questing: filecheck 0.0.24+dfsg-2
- ubuntu resolute: filecheck 0.0.24+dfsg-2build1 Β· Apache-2.0
- ubuntu stonking: filecheck 0.0.24+dfsg-2build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms