do not remove any of the #if*, #el* or #endif directives on their own
()
| 38 | |
| 39 | |
| 40 | def test_removedirectives(): |
| 41 | """do not remove any of the #if*, #el* or #endif directives on their own""" |
| 42 | |
| 43 | reduce = ReduceTest() |
| 44 | |
| 45 | filedata = [ |
| 46 | '#if 0\n', |
| 47 | '#else\n', |
| 48 | '#endif\n', |
| 49 | '#ifdef DEF\n', |
| 50 | '#elif 0\n' |
| 51 | '#endif\n' |
| 52 | ] |
| 53 | |
| 54 | expected = [ |
| 55 | '#if 0\n', |
| 56 | '#else\n', |
| 57 | '#endif\n', |
| 58 | '#ifdef DEF\n', |
| 59 | '#elif 0\n' |
| 60 | '#endif\n' |
| 61 | ] |
| 62 | |
| 63 | reduce.removedirectives(filedata) |
| 64 | assert filedata == expected |
| 65 | |
| 66 | |
| 67 | def test_combinelines_chunk(): |
nothing calls this directly
no test coverage detected