Skip to content

Commit f39c8f7

Browse files
authored
Merge pull request #664 from petrelharp/error_code
more general error on fail to write
2 parents dc197b6 + 3a43057 commit f39c8f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

c/tests/test_file_format.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,8 @@ test_dump_errors(void)
810810
CU_ASSERT_EQUAL_FATAL(ret, TSK_ERR_IO);
811811
str = tsk_strerror(ret);
812812
CU_ASSERT_TRUE(strlen(str) > 0);
813-
CU_ASSERT_STRING_EQUAL(str, strerror(EACCES));
813+
CU_ASSERT_TRUE(
814+
(strcmp(str, strerror(EACCES)) == 0) || (strcmp(str, strerror(EPERM)) == 0));
814815

815816
/* open a file in the wrong mode */
816817
f = fopen(_tmp_file_name, "r");

0 commit comments

Comments
 (0)