Merge: nitunit: set NIT_TESTING_PATH
authorJean Privat <jean@pryen.org>
Fri, 2 Dec 2016 15:13:38 +0000 (10:13 -0500)
committerJean Privat <jean@pryen.org>
Fri, 2 Dec 2016 15:13:38 +0000 (10:13 -0500)
commitc979f1f664703c60fa80b522f5f80812b860dd0a
treeb1807191f9e24e0c07913e6a89d09b4116f47c78
parentf26de10de77f8a35175910de6c340e502c755e86
parentb337f5b029c8b387942f1b7211ab10182f574c29
Merge: nitunit: set NIT_TESTING_PATH

When working with test suites, one can now use `NIT_TESTING_PATH` to retrieve the test suite path.

It can be used to access files based on the current test suite location:

~~~nit
class MyTest
super TestSuite

    fun test_suite_path do
        assert "NIT_TESTING_PATH".environ.basename == "my_test_suite.nit"
    end
end
~~~

Useful for test suites based on model loading like in #2327.

Pull-Request: #2331