Skip to content

Commit

Permalink
Improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Nov 3, 2024
1 parent 3f3bd0c commit f103de7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/test/taglibtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ TEST_F(TagLibTest, WriteID3v2TagViaLink) {
MixxxTest::getOrInitTestDir().filePath(QStringLiteral("id3-test-data/empty.mp3")),
tmpFileName);

// Access the MP3 file indirectly via a symlink when reading & writing the tags
const QString linkFileName = tempDir.filePath("no_id3v1_mp3_link");
EXPECT_TRUE(QFile::link(tmpFileName, linkFileName));

Expand All @@ -103,7 +104,7 @@ TEST_F(TagLibTest, WriteID3v2TagViaLink) {

qDebug() << "Setting track title";

// Write metadata -> only an ID3v2 tag should be added
// Write metadata (via the symlink) -> only an ID3v2 tag should be added
mixxx::TrackMetadata trackMetadata;
trackMetadata.refTrackInfo().setTitle(QStringLiteral("title"));
const auto exported =
Expand All @@ -122,9 +123,11 @@ TEST_F(TagLibTest, WriteID3v2TagViaLink) {
EXPECT_FALSE(mixxx::taglib::hasAPETag(mpegFile));
}

// Verify that the symlink still exists and still points to the correct file
auto linkFileInfoAfter = QFileInfo(linkFileName);

EXPECT_TRUE(linkFileInfoAfter.exists());
EXPECT_EQ(linkFileInfoAfter.canonicalFilePath().toStdString(), tmpFileName.toStdString());
EXPECT_TRUE(linkFileInfoAfter.isSymLink());
}
#endif

0 comments on commit f103de7

Please sign in to comment.