فهرست منبع

add more match tests

Feng Lee 10 سال پیش
والد
کامیت
991d658438
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      test/emqttd_topic_tests.erl

+ 5 - 1
test/emqttd_topic_tests.erl

@@ -52,7 +52,11 @@ match_test() ->
 
 
     ?assert( match(<<"sport">>, <<"sport/#">>) ),
     ?assert( match(<<"sport">>, <<"sport/#">>) ),
     ?assert( match(<<"sport">>, <<"#">>) ),
     ?assert( match(<<"sport">>, <<"#">>) ),
-    ?assert( match(<<"/sport/football/score/1">>, <<"#">>) ).
+    ?assert( match(<<"/sport/football/score/1">>, <<"#">>) ),
+    %% paho test
+    ?assert( match(<<"Topic/C">>, <<"+/+">>) ),
+    ?assert( match(<<"TopicA/B">>, <<"+/+">>) ),
+    ?assert( match(<<"TopicA/C">>, <<"+/+">>) ).
 
 
 sigle_level_match_test() ->
 sigle_level_match_test() ->
     ?assert( match(<<"sport/tennis/player1">>, <<"sport/tennis/+">>) ),
     ?assert( match(<<"sport/tennis/player1">>, <<"sport/tennis/+">>) ),