lmb/tests: refactored test_detect from test_core