Skip to content
Snippets Groups Projects
Commit e3b2021d authored by David Trattnig's avatar David Trattnig
Browse files

Test: Eval source type func

parent 204590ae
No related branches found
No related tags found
1 merge request!3Liquidsoap 2 migration
#!/usr/bin/env liquidsoap
#
# Aura Engine (https://gitlab.servus.at/aura/engine)
#
# Copyright (C) 2017-now() - The Aura Engine Team.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
%include "base_config.liq"
# Init defaults
engine_default_track_type = "0"
%include "../src/functions.liq"
### TEST ###
# Case 1: Fallback
type = eval_source_type("fallback_folder")
assertEquals(type, "fallback")
# Case 2: Fallback
type = eval_source_type("fallback_playlist")
assertEquals(type, "fallback")
# Case 3: Stream
type = eval_source_type("in_http_0")
assertEquals(type, "stream")
# Case 4: Analog In
type = eval_source_type("linein_0")
assertEquals(type, "analog_in")
# Case 5: Unknown Source
type = eval_source_type("foo_bar")
assertEquals(type, "unknown_source")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment