Implemented unit tests for WriteToTempFile, including successful writing to a temporary file and failure cases due to an invalid TMPDIR. These tests ensure the method behaves correctly under different conditions and enhances code robustness.
Added a check for the "PERFORM_UNIX_OPEN_WRITE_TESTS" environment variable to conditionally skip tests. This ensures tests are only executed when the variable is set to "true". Additionally, commented out the TestMsg_WriteToTempFileFailed function.
Reorganized message writing tests to create more concise and specific scenarios, including new context tests and WriteToFile tests. Removed outdated and redundant test cases to streamline the test suite.
Unified the test cases for AttachFile, AttachReader, AttachReadSeeker, EmbedFile, EmbedReader, and EmbedReadSeeker by incorporating the previously separate UNIX-specific tests into the general test files. This change enhances maintainability by reducing code duplication and ensuring more consistent test coverage across platforms.
Introduce unit tests for EmbedReadSeeker, EmbedHTMLTemplate, EmbedTextTemplate, and EmbedFromEmbedFS methods in the Msg package. These tests cover various use cases and error scenarios, ensuring the correct handling of embedded content.
Introduced unit tests to verify the embedding of files and readers in messages, including tests specific to Unix file handling scenarios. These tests ensure correct handling of embed errors and proper cleanup of temporary files.
Introduce tests for the AttachReadSeeker method, detailing scenarios for general use and Unix-specific paths. Ensure file handling and error conditions are properly validated to maintain robustness.
Added a test environment variable to control Unix write tests and included their setup in the test function. Also corrected the OS version matrix by uncommenting '14.0' and '13.4'.
Renamed `msg_nowin_test.go` to `msg_unix_test.go` to better reflect its purpose. Updated the file attachment test to use `/dev/mem` for Unix environments instead of a temporary file with restricted permissions, ensuring compatibility with continuous integration environments.