[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: testing uninstalled code (lua 5.2 path)
- From: Gaspard Bucher <gaspard@...>
- Date: Wed, 10 Apr 2013 16:18:29 +0200
Hi there !
How do you guys do it when you have an installed version of a library and want to test the currently developed code ? With lua 5.1, just running the tests in the project works because the first element in package.path is "./?.lua". In 5.2, this is the last element.
You can create a script with package.path rewriting, but this would not work if you just "run" the current test script in your editor (current path properly set to the project folder).
Any idea on a way to have "run current test file" require the development versions (5.1 behavior) ? Rewriting "package.path" must be done with caution because the tests might be run in batch mode.