mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-02-05 18:50:06 +08:00
Fix mosquitto_topic_matches_sub().
This commit is contained in:
@@ -16,6 +16,13 @@ void do_check(const char *sub, const char *topic, bool bad_res)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
do_check("foo/#", "foo/", false);
|
||||
do_check("foo#", "foo", true);
|
||||
do_check("fo#o/", "foo", true);
|
||||
do_check("foo#", "fooa", true);
|
||||
do_check("foo+", "foo", true);
|
||||
do_check("foo+", "fooa", true);
|
||||
|
||||
do_check("test/6/#", "test/3", true);
|
||||
do_check("foo/bar", "foo/bar", false);
|
||||
do_check("foo/+", "foo/bar", false);
|
||||
|
||||
@@ -10,7 +10,7 @@ def start_broker(filename, cmd=None, port=1888):
|
||||
if cmd is None:
|
||||
cmd = ['../../src/mosquitto', '-v', '-c', filename.replace('.py', '.conf')]
|
||||
if os.environ.get('MOSQ_USE_VALGRIND') is not None:
|
||||
cmd = ['valgrind', '-q', '--log-file='+filename+'.vglog'] + cmd
|
||||
cmd = ['valgrind', '--trace-children=yes', '-v', '--log-file='+filename+'.vglog'] + cmd
|
||||
delay = 1
|
||||
|
||||
broker = subprocess.Popen(cmd, stderr=subprocess.PIPE)
|
||||
|
||||
Reference in New Issue
Block a user