Inject std when --test. #1127, #3241