File indexing completed on 2024-05-12 15:55:47
0001 # SPDX-FileCopyrightText: 2018-2020 Johannes Zarl-Zierl <johannes@zarl-zierl.at> 0002 # 0003 # SPDX-License-Identifier: BSD-2-Clause 0004 0005 _checks[check_autostacking]="Feature: Automatic Stacking Of Image Variants" 0006 _context[check_autostacking]="<h2>What this test will do:</h2> 0007 <ul> 0008 <li>This test checks whether the modified image detection works.</li> 0009 <li>After you close this dialog, KPhotoAlbum will be started and it will search for new images.</li> 0010 </ul> 0011 <h2>How you can check manually</h2> 0012 <ol> 0013 <li>Check that the file <tt>grand_canyon_1-edited.jpg</tt> has been stacked with <tt>grand_canyon_1.jpg</tt> and that the tags have been copied.</li> 0014 <li>Check that the file <tt>grand_canyon_1-edited-unrelated.jpg</tt> has not been stacked.</li> 0015 </ol> 0016 <h2>What you have to do:</h2> 0017 <ol> 0018 <li>When KPhotoAlbum starts, save the database and exit KPhotoAlbum.</li> 0019 </ol>" 0020 _check_db_file[check_autostacking]=integration-tests/check_autostacking.result.xml 0021 prepare_check_autostacking() 0022 { 0023 local check_dir="$1" 0024 echo -e "$BASE_RC" > "$check_dir/kphotoalbumrc" 0025 # The two images were originally created using these commands: 0026 #convert "$check_dir/db/grand_canyon_1.jpg" -pointsize 60 -draw "gravity center fill red text 0,0 'EDITED - Autostacked'" "$check_dir/db/grand_canyon_1-edited.jpg" 0027 #convert -size 700x460 label:"NOT STACKED" "$check_dir/db/grand_canyon_1-edited-unrelated.jpg" 0028 #exiv2 -M"set Exif.Photo.DateTimeOriginal '2000-01-01 00:00:00'" "$check_dir/db/grand_canyon_1-edited.jpg" "$check_dir/db/grand_canyon_1-edited-unrelated.jpg" 0029 # ... but to get the same md5 sums every time we just copy them: 0030 cp -a "$mydir/integration-tests/check_autostacking/grand_canyon_1-edited-unrelated.jpg" "$check_dir/db/" 0031 cp -a "$mydir/integration-tests/check_autostacking/grand_canyon_1-edited.jpg" "$check_dir/db/" 0032 } 0033 call_check_autostacking() 0034 { 0035 local check_dir="$1" 0036 kphotoalbum --db "$check_dir/db/index.xml" --search 0037 } 0038 check_autostacking() 0039 { 0040 generic_check check_autostacking 0041 }