diff --git a/tests/integration/tests/templates.py b/tests/integration/tests/templates.py index 478b2b52f1..2c2b2bd4da 100644 --- a/tests/integration/tests/templates.py +++ b/tests/integration/tests/templates.py @@ -63,9 +63,16 @@ rm -rf "$ARTIFACT_DIR" mkdir -p "$ARTIFACT_DIR" +diff_idx=0 while IFS= read -r transform; do [[ -z "$transform" ]] && continue - DIFF_FILE="$ARTIFACT_DIR/${transform}.diff" + + # Print the index in 4 digit format with leading zeroes, + # so the indices align just like in git outputs + diff_idx4=$(printf "%04d" "${diff_idx}") + : $((diff_idx++)) + + DIFF_FILE="$ARTIFACT_DIR/${diff_idx4}_${transform}.diff" c2rust-refactor \ ${transform} \