2023-01-12 23:35:51 +01:00
|
|
|
// Copyright 2023 wanderer <a_mirre at utb dot cz>
|
2022-07-18 23:12:33 +02:00
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
2023-01-21 17:26:01 +01:00
|
|
|
import (
|
|
|
|
"flag"
|
|
|
|
"testing"
|
|
|
|
)
|
2022-07-18 23:12:33 +02:00
|
|
|
|
|
|
|
func TestRun(t *testing.T) {
|
2022-08-03 17:39:51 +02:00
|
|
|
t.Log("call run() (TODO: improve this test)")
|
2023-01-21 17:26:01 +01:00
|
|
|
|
|
|
|
timeout := "1m10s"
|
|
|
|
|
2023-02-04 20:54:49 +01:00
|
|
|
t.Log("set test timeout to", timeout)
|
2023-01-21 17:26:01 +01:00
|
|
|
|
|
|
|
if err := flag.Set("test.timeout", timeout); err != nil {
|
|
|
|
t.Errorf("failed to set timeout to %s", timeout)
|
|
|
|
}
|
|
|
|
|
2023-02-09 03:46:07 +01:00
|
|
|
if err := flag.Set("c2jde", "false"); err != nil {
|
2023-02-04 20:54:49 +01:00
|
|
|
t.Errorf("failed to not run jDE: %q", err)
|
|
|
|
}
|
|
|
|
|
2022-07-18 23:12:33 +02:00
|
|
|
run()
|
|
|
|
}
|