[task parameters]
    num = 99..101..2
    stuff = this, that
    state = open, closed
[scheduling]
    [[graph]]
        R1 = """
           t1<num,stuff> => t2<num,stuff>
           x<stuff>
        """
[runtime]
    [[T]]
        [[[environment]]]
            MYNUM = %(num)d
            MYSTUFF = stuff %(stuff)s
            MY_FILE = %(num)04d-%(stuff)s
    [[U<state>]]
        [[[environment]]]
            STATUS = %(state)s
    [[t1<num,stuff>]]
        inherit = T, U<state=open>
        script = """
            FILE="${CYLC_WORKFLOW_RUN_DIR}/t1-${MY_FILE}"
            echo "${MYNUM} ${MYSTUFF} ${STATUS}" >"${FILE}"
            diff ${FILE} ${FILE}.ref
        """
    [[t2<num,stuff>]]
        inherit = T, U<state=closed>
        script = """
            FILE="${CYLC_WORKFLOW_RUN_DIR}/t2-${MY_FILE}"
            echo "${MYNUM} ${MYSTUFF} ${STATUS}" >"${FILE}"
            diff ${FILE} ${FILE}.ref
        """
    # The following tests the example of GH #4248. We had wrongly assumed that
    # general comes before specific, for parameters in inherited environments.
    [[x<stuff=that>]]
        inherit = U<state=closed>
        script = test $STATUS == closed
    [[x<stuff>]]
        pre-script = "echo pre"
