- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for CaptureStdout (0.48 sec)
-
pkg/log/default_test.go
caller: true, wantExit: true, stackLevel: DebugLevel, }, } for i, c := range cases { t.Run(strconv.Itoa(i), func(t *testing.T) { var exitCalled bool lines, err := captureStdout(func() { o := testOptions() o.JSONEncoding = c.json if err := Configure(o); err != nil { t.Errorf("Got err '%v', expecting success", err) } pt := funcs.Load().(patchTable)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Mar 26 20:38:10 UTC 2024 - 7.4K bytes - Viewed (0) -
pkg/log/scope_test.go
package log import ( "errors" "regexp" "strconv" "testing" "go.uber.org/zap/zapcore" "k8s.io/klog/v2" ) func runTest(t *testing.T, f func()) []string { lines, err := captureStdout(func() { Configure(DefaultOptions()) f() _ = Sync() }) if err != nil { t.Fatalf("Got error '%v', expected success", err) } if lines[len(lines)-1] == "" { return lines[:len(lines)-1] }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jan 03 17:36:09 UTC 2024 - 11K bytes - Viewed (0) -
pkg/log/config_test.go
t.Errorf("Expecting for first line of log to contain HELLO, got %s", lines[0]) } } func TestRotateAndStdout(t *testing.T) { dir := t.TempDir() file := dir + "/rot.log" stdoutLines, _ := captureStdout(func() { o := DefaultOptions() o.RotateOutputPath = file if err := Configure(o); err != nil { t.Fatalf("Unable to configure logger: %v", err) } defaultScope.Error("HELLO")
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Mar 26 20:38:10 UTC 2024 - 10.9K bytes - Viewed (0) -
pkg/log/logr_test.go
package log import ( "errors" "testing" "github.com/go-logr/logr" ) func runLogrTestWithScope(t *testing.T, s *Scope, f func(l logr.Logger)) []string { lines, err := captureStdout(func() { Configure(DefaultOptions()) l := NewLogrAdapter(s) f(l) _ = Sync() }) if err != nil { t.Fatalf("Got error '%v', expected success", err) } if lines[len(lines)-1] == "" {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 4.1K bytes - Viewed (0) -
testing/performance/src/templates/native-dependents-resources/googleTest/libs/googleTest/1.7.0/include/gtest/internal/gtest-port.h
#if GTEST_HAS_STREAM_REDIRECTION // Defines the stderr capturer: // CaptureStdout - starts capturing stdout. // GetCapturedStdout - stops capturing stdout and returns the captured string. // CaptureStderr - starts capturing stderr. // GetCapturedStderr - stops capturing stderr and returns the captured string. // GTEST_API_ void CaptureStdout(); GTEST_API_ std::string GetCapturedStdout();
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 04 07:21:38 UTC 2024 - 67.2K bytes - Viewed (0) -
platforms/documentation/docs/src/snippets/native-binaries/google-test/groovy/libs/googleTest/1.7.0/include/gtest/internal/gtest-port.h
#if GTEST_HAS_STREAM_REDIRECTION // Defines the stderr capturer: // CaptureStdout - starts capturing stdout. // GetCapturedStdout - stops capturing stdout and returns the captured string. // CaptureStderr - starts capturing stderr. // GetCapturedStderr - stops capturing stderr and returns the captured string. // GTEST_API_ void CaptureStdout(); GTEST_API_ std::string GetCapturedStdout();
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Nov 27 17:53:42 UTC 2023 - 67.2K bytes - Viewed (0)