On Thu, Dec 09, 2021 at 12:11:02AM -0500, Eric Sunshine wrote: > This test populates its `expect` file solely by appending content but > fails to ensure that the file starts out empty. The test succeeds only > because no earlier test populated a file of the exact same name, however > this is an accident waiting to happen. Make the test more robust by > ensuring that it contains exactly the intended content. Agreed. > While at it, simplify the implementation via a straightforward `sed` > application and by avoiding dropping out of the single-quote context > within the test body (thus eliminating a hard-to-digest combination of > apostrophes and backslashes). I find them equally ugly. :) The most confusing thing is that we are not doing any shell quoting at all, just adding single-quote wrappers. But that is OK because %(raw:size) should never need quoting. Your solution seems fine to me. -Peff