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}."
62
+
fail "${testCaseNumber}.) Tests failed: Expected return code 0 for an existing hash file with matching value (no change detected), but got ${changeDetectionReturnCode}."
61
63
fi
62
64
63
-
# Test case 3
64
-
echo"testDetectChangedFiles: 3.) Detect a changed file when the hashfile contains a different value as the current one."
65
+
testCaseNumber=$((testCaseNumber +1))
66
+
echo"testDetectChangedFiles: ${testCaseNumber}.) Detect a changed file when the hashfile contains a different value as the current one."
65
67
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}."
70
+
fail "${testCaseNumber}.) Tests failed: Expected return code 2 for an existing hash file with differing value (change detected), but got ${changeDetectionReturnCode}."
69
71
fi
70
72
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.)."
73
+
testCaseNumber=$((testCaseNumber +1))
74
+
echo"testDetectChangedFiles: ${testCaseNumber}.) Detect a changed directory when the hashfile contains a different value as the current one."
75
+
echo"Some CHANGED Test Directory Content">"${testFileForChangeDetection}"
fail "${testCaseNumber}.) Tests failed: Expected return code 2 for an existing hash file with differing value (change detected), but got ${changeDetectionReturnCode}."
79
+
fi
80
+
81
+
testCaseNumber=$((testCaseNumber +1))
82
+
echo"testDetectChangedFiles: ${testCaseNumber}.) Detect an unchanged directory when the hashfile contains the same value as the newly calculated one."
fail "${testCaseNumber}.) Tests failed: Expected return code 0 for an existing hash file with matching value (no change detected), but got ${changeDetectionReturnCode}."
86
+
fi
87
+
88
+
testCaseNumber=$((testCaseNumber +1))
89
+
echo"testDetectChangedFiles: ${testCaseNumber}.) 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}."
92
+
fail "${testCaseNumber}.) Tests failed: Expected return code 0 for an existing hash file with matching value (no change detected), but got ${changeDetectionReturnCode}."
76
93
fi
77
94
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."
95
+
testCaseNumber=$((testCaseNumber +1))
96
+
echo"testDetectChangedFiles: ${testCaseNumber}.) Detect a changed file when the hashfile contains a different value as the current one in read-only mode."
80
97
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}."
100
+
fail "${testCaseNumber}.) Tests failed: Expected return code 2 for an existing hash file with differing value (change detected), but got ${changeDetectionReturnCode}."
84
101
fi
85
102
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."
103
+
testCaseNumber=$((testCaseNumber +1))
104
+
echo"testDetectChangedFiles: ${testCaseNumber}.) 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}."
107
+
fail "${testCaseNumber}.) Tests failed: Expected return code 2 for an existing hash file with differing value (change detected), but got ${changeDetectionReturnCode}."
91
108
fi
92
109
93
-
# Test case 7
94
-
echo"testDetectChangedFiles: 7.) Fail on not existing first path"
110
+
testCaseNumber=$((testCaseNumber +1))
111
+
echo"testDetectChangedFiles: ${testCaseNumber}.) Fail on not existing first path"
95
112
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}."
113
+
fail "${testCaseNumber}.) Tests failed: Expected to fail due to a wrong paths option, but got ${changeDetectionReturnCode}."
97
114
fi
98
115
99
-
# Test case 8
100
-
echo"testDetectChangedFiles: 8.) Fail on not existing second path"
116
+
testCaseNumber=$((testCaseNumber +1))
117
+
echo"testDetectChangedFiles: ${testCaseNumber}.) Fail on not existing second path"
101
118
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}."
119
+
fail "${testCaseNumber}.) Tests failed: Expected to fail due to a wrong paths option, but got ${changeDetectionReturnCode}."
103
120
fi
104
121
105
-
# Test case 9
106
-
echo"testDetectChangedFiles: 9.) Interpret missing paths as 'nothing changed'."
122
+
testCaseNumber=$((testCaseNumber +1))
123
+
echo"testDetectChangedFiles: ${testCaseNumber}.) Interpret missing paths as 'nothing changed'."
0 commit comments