From 7e9a9107f77be02ba7c10736f12455db5e7500f3 Mon Sep 17 00:00:00 2001 From: Maxr1998 Date: Sun, 22 Jun 2025 15:00:28 +0200 Subject: [PATCH 1/2] Fix timestamp format in LrcLyricParserTest --- LrcParser.Tests/Parser/Lrc/Lines/LrcLyricParserTest.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LrcParser.Tests/Parser/Lrc/Lines/LrcLyricParserTest.cs b/LrcParser.Tests/Parser/Lrc/Lines/LrcLyricParserTest.cs index faaa461..3636316 100644 --- a/LrcParser.Tests/Parser/Lrc/Lines/LrcLyricParserTest.cs +++ b/LrcParser.Tests/Parser/Lrc/Lines/LrcLyricParserTest.cs @@ -12,9 +12,9 @@ namespace LrcParser.Tests.Parser.Lrc.Lines; public class LrcLyricParserTest : BaseSingleLineParserTest { - [TestCase("[00:17:97]帰[00:18:37]り[00:18:55]道[00:18:94]は[00:19:22]", true)] - [TestCase("[00:17:97]<00:00.00>帰<00:00.00>り<00:00.00>道<00:00.00>は<00:00.00>", true)] - [TestCase("karaoke", true)] // depends on the config, might be parsed but no time, or being ignored. + [TestCase("[00:17.97]帰[00:18.37]り[00:18.55]道[00:18.94]は[00:19.22]", true)] + [TestCase("[00:17.97]<00:00.00>帰<00:00.00>り<00:00.00>道<00:00.00>は<00:00.00>", true)] + [TestCase("karaoke", true)] [TestCase("", false)] [TestCase(null, false)] public void TestCanDecode(string text, bool expected) From 5afe88a486ece30ae9624f1fb8e69052b914235a Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sun, 22 Jun 2025 21:21:30 +0800 Subject: [PATCH 2/2] Add more test cases and comments for it. Some test cases might be false if not support parsing the lyric without start timing. --- LrcParser.Tests/Parser/Lrc/Lines/LrcLyricParserTest.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LrcParser.Tests/Parser/Lrc/Lines/LrcLyricParserTest.cs b/LrcParser.Tests/Parser/Lrc/Lines/LrcLyricParserTest.cs index 3636316..be730a4 100644 --- a/LrcParser.Tests/Parser/Lrc/Lines/LrcLyricParserTest.cs +++ b/LrcParser.Tests/Parser/Lrc/Lines/LrcLyricParserTest.cs @@ -14,7 +14,9 @@ public class LrcLyricParserTest : BaseSingleLineParserTest帰<00:00.00>り<00:00.00>道<00:00.00>は<00:00.00>", true)] - [TestCase("karaoke", true)] + [TestCase("[00:17.97]", true)] // only start time-tag can be decode. + [TestCase("[00:17:97]", true)] // invalid time-tag might be decoded as lyric string with no time-tag info. + [TestCase("karaoke", true)] // string might be parsed into lyric without any time info for now. [TestCase("", false)] [TestCase(null, false)] public void TestCanDecode(string text, bool expected)