  Let $R$ be a commutative Noetherian local ring of prime characteristic $p$.
The main purposes of this paper are to show that if the injective envelope $E$
of the simple $R$-module has a structure as a torsion-free left module over the
Frobenius skew polynomial ring over $R$, then $R$ has a tight closure test
element (for modules) and is $F$-pure, and to relate the test ideal of $R$ to
the smallest '$E$-special' ideal of $R$ of positive height.
  A byproduct is an analogue of a result of Janet Cowden Vassilev: she showed,
in the case where $R$ is an $F$-pure homomorphic image of an $F$-finite regular
local ring, that there exists a strictly ascending chain $0 = \tau_0 \subset
\tau_1 \subset ... \subset \tau_t = R$ of radical ideals of $R$ such that, for
each $i = 0, ..., t-1$, the reduced local ring $R/\tau_i$ is $F$-pure and its
test ideal (has positive height and) is exactly $\tau_{i+1}/\tau_i$. This paper
presents an analogous result in the case where $R$ is complete (but not
necessarily $F$-finite) and $E$ has a structure as a torsion-free left module
over the Frobenius skew polynomial ring. Whereas Cowden Vassilev's results were
based on R. Fedder's criterion for $F$-purity, the arguments in this paper are
based on the author's work on graded annihilators of left modules over the
Frobenius skew polynomial ring.
