math-optim/run_test.go
leo 3237fd16c6
All checks were successful
continuous-integration/drone/push Build is passing
actually don't run jDE with run_test.go
* an incomplete fix was attempted in 071cb75 but that did not prevent
  jDE from running with tests (as it does by default)
* bring func-local vars to pkg level to be able to manipulate them
  programatically (such as from tests)
* prevent jDE from running by setting -jde=false
* reword log message in test
2023-02-04 20:54:49 +01:00

28 lines
502 B
Go

// Copyright 2023 wanderer <a_mirre at utb dot cz>
// SPDX-License-Identifier: GPL-3.0-or-later
package main
import (
"flag"
"testing"
)
func TestRun(t *testing.T) {
t.Log("call run() (TODO: improve this test)")
timeout := "1m10s"
t.Log("set test timeout to", timeout)
if err := flag.Set("test.timeout", timeout); err != nil {
t.Errorf("failed to set timeout to %s", timeout)
}
if err := flag.Set("jde", "false"); err != nil {
t.Errorf("failed to not run jDE: %q", err)
}
run()
}