Primitive restart affects primitive assembly. If you’re using a mode where some vertices are used by more than one primitive (e.g. line strip, line loop, triangle strip, triangle fan), it causes the following indices to be treated as starting a new sequence (e.g. for a triangle fan, the vertex specified by the immediately-following index will become the shared vertex). If you aren’t using such a mode, primitive restart has no effect.
The transform-feedback output should be as if you had split the draw call into multiple draw calls. So if you had
GLuint indices[] = {0,1,2,999,3,4,5};
glPrimitiveRestartIndex(999);
glEnable(GL_PRIMITIVE_RESTART);
glDrawElements(GL_LINE_LOOP, 7, GL_UNSIGNED_INT, indices);
the result should be the same as
GLuint indices1[] = {0,1,2};
glDrawElements(GL_LINE_LOOP, 3, GL_UNSIGNED_INT, indices1);
GLuint indices2[] = {3,4,5};
glDrawElements(GL_LINE_LOOP, 3, GL_UNSIGNED_INT, indices2);
In either case, the output should contain the data for the vertices [0,1,1,2,2,0,3,4,4,5,5,3].