{
"id": "fn-test-file_contents_not_equal",
"dataComponent": "test",
"heading": {
"title": "file_contents_not_equal",
"badges": [
"Testing",
"Assert"
]
},
"synopsis": "Fails the current test if a file's contents match the given string, or if the file cannot be read.",
"codeBlocks": [
"extend(\"test\")\n\n# Basic usage:\nfile_contents_not_equal(\"/tmp/output.log\", \"This should not be present\")\n# => passes if the file content is different.\n# => fails if it's exactly the same, or if the file can't be read.\n"
],
"notes": [
"Expects exactly 2 arguments: (filename, compareString).",
"If the file contents match the given string or the file can't be read, the test fails immediately with an error message.",
"Useful for asserting that a file does NOT contain certain output or contents."
]
}