from ..helpers import *


def test_concurrency():
    ret, out, err = get_honcho_output(['-f', 'Procfile.concurrency', 'start', '-cfoo=3,bar=2'])

    assert_equal(ret, 0)

    assert_regexp_matches(out, r'foo\.1 \| (....)?foo')
    assert_regexp_matches(out, r'foo\.2 \| (....)?foo')
    assert_regexp_matches(out, r'foo\.3 \| (....)?foo')
    assert_regexp_matches(out, r'bar\.1 \| (....)?bar')
    assert_regexp_matches(out, r'bar\.2 \| (....)?bar')
