7ea0af7 Improve automatic test suite

Authored and Committed by Otto Urpelainen 3 years ago
    Improve automatic test suite
    
    1. In layout tests, remove duplicate assertions. No harmful, but unnecessary.
    2. In test_commands, when asserting rpmdefines, check that there are no other defines than expected.
    3. In test_cli, TestImportSrpm was failing because stdout had more than one row like the test case
    expected. Improved assert to compare only the last item of the last line of output, which should
    have the expected content. Depending on rpm version, there can be multipe lines of output, notably
    one like `setting SOURCE_DATE_EPOCH=1136073600`, and depending on locale settings, the last row
    can have more than two components when split by whitespace, because the line starts with localized
    string "Wrote:", which may be translated to multiple works (arguably, a better fix would be to
    avoid using the current locale when running the tests - but since the same line of code needs
    changes anyhow, it makes sense to apply this simple fix now)
    
    Also, fix a typo in a method description.
    
    Signed-off-by: Otto Urpelainen <oturpe@iki.fi>
    
        
file modified
+1 -1
file modified
+1 -1
file modified
+1 -0
file modified
+0 -1
file modified
+0 -1