Created attachment 784348 [details] Patch adding rlAssertEmpty and rlAssertNotEmpty functions Description of problem: I think it would be great if we had beakerlib functions checking if the file is empty. So far, I've been testing file emptiness manually. Recently, in one of the php tests, I noticed a comment that stated: > # -> needs a rlAssertEmpty! Since I'm not the only one that would appreciate these functions, I decided to write them. Version-Release number of selected component (if applicable): beakerlib-1.8
This does not need to be private
We have decided against adding more trivial (rlRun "[ -s $file ]" does the same thing) asserts to BL in the past. But I think this is not without merit. rlAssertEmpty is more readable than the above. I'll gather some feedback on the general question of adding more trivial assertions to BL, and then decide how to proceed here.
I'm not convinced the costs (added complexity, learning and maintenance) outweight the benefit. I think it is prone to problems with unusual applications (directories...), fixing which would make it even more complicated and multifaceted. Thus, WONTFIX.