Regression test making sure Boost Jam's SORT builtin rule does not get quadratic behaviour again in this use case.
()
| 54 | ############################################################################### |
| 55 | |
| 56 | def testSORTDuration(): |
| 57 | """ |
| 58 | Regression test making sure Boost Jam's SORT builtin rule does not get |
| 59 | quadratic behaviour again in this use case. |
| 60 | |
| 61 | """ |
| 62 | t = BoostBuild.Tester(["-ftest.jam", "-d1"], pass_toolset=False, |
| 63 | use_test_config=False) |
| 64 | |
| 65 | f = open(t.workpath("test.jam"), "w") |
| 66 | print >> f, "data = " |
| 67 | for i in range(0, 20000): |
| 68 | if i % 2: |
| 69 | print >> f, '"aaa"' |
| 70 | else: |
| 71 | print >> f, '"bbb"' |
| 72 | print >> f, """; |
| 73 | |
| 74 | ECHO "starting up" ; |
| 75 | sorted = [ SORT $(data) ] ; |
| 76 | ECHO "done" ; |
| 77 | NOCARE all ; |
| 78 | """ |
| 79 | f.close() |
| 80 | |
| 81 | t.run_build_system(expected_duration=1) |
| 82 | t.expect_output_lines("starting up") |
| 83 | t.expect_output_lines("done") |
| 84 | |
| 85 | t.cleanup() |
| 86 | |
| 87 | |
| 88 | ############################################################################### |
no test coverage detected