From 890de0c60ae6359c03e64da2a1af5dedc3b4461a Mon Sep 17 00:00:00 2001 From: Feng Date: Sat, 13 Feb 2016 18:34:28 +0800 Subject: [PATCH] is_queue/1, -ifdef(TEST). --- src/emqttd_topic.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/emqttd_topic.erl b/src/emqttd_topic.erl index 86e9d2d2d..9f4c0988f 100644 --- a/src/emqttd_topic.erl +++ b/src/emqttd_topic.erl @@ -14,7 +14,6 @@ %% limitations under the License. %%-------------------------------------------------------------------- -%% @doc MQTT Topic Functions -module(emqttd_topic). -import(lists, [reverse/1]). @@ -23,6 +22,10 @@ -export([join/1, feed_var/3, is_queue/1, systop/1]). +-ifdef(TEST). +-compile(export_all). +-endif. + -type topic() :: binary(). -type word() :: '' | '+' | '#' | binary(). @@ -144,6 +147,8 @@ word(Bin) -> Bin. -spec is_queue(topic()) -> boolean(). is_queue(<<"$Q/", _Queue/binary>>) -> true; +is_queue(<<"$q/", _Queue/binary>>) -> + true; is_queue(_) -> false.