From f103de7b66c725e52fdd448f027621330244f09d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Sun, 3 Nov 2024 21:41:34 +0100 Subject: [PATCH] Improve comments --- src/test/taglibtest.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/taglibtest.cpp b/src/test/taglibtest.cpp index 3691d30b2e7..5dbe57a7e7c 100644 --- a/src/test/taglibtest.cpp +++ b/src/test/taglibtest.cpp @@ -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)); @@ -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 = @@ -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