zeroshade commented on PR #149: URL: https://github.com/apache/iceberg-go/pull/149#issuecomment-2351717136
This is awesome for a find, thanks for this! As for your questions: I personally prefer this one: ```go pterm.SetDefaultOutput(os.Stdout) text{}.DescribeTable(table) // Output: // Expected output ``` But given the 3rd part of this, it can definitely make more sense to do the first option if that's easier to implement. > 2. Also we need to disable colors. Otherwise output has ANSI codes, making comparison impossible. Can we only disable the colors for the tests? I personally don't want to lose the colors for regular output and use of the CLI, perhaps we make an option for disabling colors or a global var that the test can set to disable it? > In our case, Metadata location | has whitespace after the pipe |, which is getting removed. Should we modify the output to not print trailing whitespaces? > And also Examples do not provide any diff when actual result doesn't match expected one. That's fair, we just get a "want: ...." and "got: ...." which would make diffing difficult. In light of this, it might make sense to go with the example you've provided here that writes to a buffer and we compare manually so that we can output the diff instead. -- 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