You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fail "2.) Tests failed: Expected return code 0 for an existing hash file with matching value (no change detected), but got ${changeDetectionReturnCode}."
61
+
fi
62
+
63
+
# Test case 3
64
+
echo"testDetectChangedFiles: 3.) Detect a changed file when the hashfile contains a different value as the current one."
65
+
echo"Some CHANGED Test Content">"${testFileForChangeDetection}"
fail "3.) Tests failed: Expected return code 2 for an existing hash file with differing value (change detected), but got ${changeDetectionReturnCode}."
69
+
fi
70
+
71
+
# Test case 4
72
+
echo"testDetectChangedFiles: 4.) Detect an unchanged file when the hashfile contains the same value as the current one again. Same as 2.) but different after 3.)."
fail "4.) Tests failed: Expected return code 0 for an existing hash file with matching value (no change detected), but got ${changeDetectionReturnCode}."
76
+
fi
77
+
78
+
# Test case 5
79
+
echo"testDetectChangedFiles: 5.) Detect a changed file when the hashfile contains a different value as the current one in read-only mode."
80
+
echo"Some CHANGED AGAIN Test Content">"${testFileForChangeDetection}"
fail "5.) Tests failed: Expected return code 2 for an existing hash file with differing value (change detected), but got ${changeDetectionReturnCode}."
84
+
fi
85
+
86
+
# Test case 6
87
+
echo"testDetectChangedFiles: 6.) Detect a changed file when the hashfile hadn't been update with the last change detection in read-only mode."
fail "6.) Tests failed: Expected return code 2 for an existing hash file with differing value (change detected), but got ${changeDetectionReturnCode}."
91
+
fi
92
+
93
+
# Test case 7
94
+
echo"testDetectChangedFiles: 7.) Fail on not existing first path"
95
+
if changeDetectionReturnCode=$(source"${SCRIPTS_DIR}/detectChangedFiles.sh" --hashfile "${testHashFile}" --paths "./nonExistingFile.txt,${testFileForChangeDetection}");then
96
+
fail "7.) Tests failed: Expected to fail due to a wrong paths option, but got ${changeDetectionReturnCode}."
97
+
fi
98
+
99
+
# Test case 8
100
+
echo"testDetectChangedFiles: 8.) Fail on not existing second path"
101
+
if changeDetectionReturnCode=$(source"${SCRIPTS_DIR}/detectChangedFiles.sh" --hashfile "${testHashFile}" --paths "${testFileForChangeDetection},./nonExistingFile2.txt");then
102
+
fail "8.) Tests failed: Expected to fail due to a wrong paths option, but got ${changeDetectionReturnCode}."
103
+
fi
104
+
105
+
# Test case 9
106
+
echo"testDetectChangedFiles: 9.) Interpret missing paths as 'nothing changed'."
0 commit comments