alex-kar commented on PR #149: URL: https://github.com/apache/iceberg-go/pull/149#issuecomment-2351671261
@zeroshade 1. I've figured out how to run tests with pterm, but there are a few questions I need your input on. ``` var buf bytes.Buffer pterm.SetDefaultOutput(&buf) text{}.DescribeTable(table) // compare buf.String() with expected result ``` 2. Also we need to disable colors. Otherwise output has ANSI codes, making comparison impossible. ``` pterm.DisableColor() ``` 3. Not sure if we can reuse `Examples`. https://github.com/golang/go/issues/26460 ``` The trailing spaces cannot be handled by the // Output: of an Example ``` In our case, `Metadata location | ` has whitespace after the pipe `|`, which is getting removed. ``` // Output: // Table format version | 2 // Metadata location | // ... ``` And also `Examples` do not provide any diff when actual result doesn't match expected one. So, for this matter I used 3rd party `github.com/MarvinJWendt/testza`, but maybe there is a better approach. I've pushed some working version as an example of what I have so far. I'd appreciate some feedback before I proceed with covering all scenarios. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org