From 173c00415b27214b2bb67ac15359d7e50be60623 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 9 Sep 2013 04:35:22 +0000 Subject: tracklist: fix go_to functionality We need to preserve the go_to-specified position for next_track, doing otherwise would cause us to always be off-by-one. --- test/test_tracklist.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test') diff --git a/test/test_tracklist.rb b/test/test_tracklist.rb index cc462c5..e4ca9ac 100644 --- a/test/test_tracklist.rb +++ b/test/test_tracklist.rb @@ -49,6 +49,7 @@ class TestTracklist < Testcase tl.instance_variable_get(:@list).replace(%w(a b c d e f g)) mapping = _build_mapping(tl) assert_equal 'f', tl.go_to(mapping['f']) + assert_equal 'f', tl.next_track assert_nil tl.go_to(1 << 128) assert_equal 'g', tl.next_track end -- cgit v1.2.3-24-ge0c7