mirror of
https://github.com/SFML/SFML.git
synced 2025-02-13 03:48:02 +08:00
Test opening sf::Music
with non-ASCII filenames
This commit is contained in:
parent
645796f7fb
commit
594eb408cb
@ -133,7 +133,21 @@ TEST_CASE("[Audio] sf::Music", runAudioDeviceTests())
|
||||
|
||||
SECTION("Valid file")
|
||||
{
|
||||
REQUIRE(music.openFromFile("Audio/ding.mp3"));
|
||||
SECTION("ASCII filename")
|
||||
{
|
||||
REQUIRE(music.openFromFile("Audio/ding.mp3"));
|
||||
}
|
||||
|
||||
SECTION("Polish filename")
|
||||
{
|
||||
REQUIRE(music.openFromFile(U"Audio/ding-\u0144.mp3"));
|
||||
}
|
||||
|
||||
SECTION("Emoji filename")
|
||||
{
|
||||
REQUIRE(music.openFromFile(U"Audio/ding-\U0001F40C.mp3"));
|
||||
}
|
||||
|
||||
CHECK(music.getDuration() == sf::microseconds(1990884));
|
||||
const auto [offset, length] = music.getLoopPoints();
|
||||
CHECK(offset == sf::Time::Zero);
|
||||
|
Loading…
x
Reference in New Issue
Block a user