Dear all,

I'm trying to write a unit test for \token_if_space:NTF, but I'm  
having some difficulty this early in the morning. Spaces are consumed  
after the control sequence, as an argument is being scanned for, so  
I'm not sure how to pass a space char into the conditional. I haven't  
had any luck getting it to trip true; any hints how to do this and  
when the function might be used?

For the curious, the definition is:

% implicit \catcode`\~=5 % space
\def_new:Npn \token_new:Nn #1#2 {\glet_new:NN #1#2}
\token_new:Nn \c_space_token {~}
\def_long_new:Npn \token_if_space_p:N #1{
   \if_catcode:w \exp_not:N #1\c_space_token
     \c_true
   \else:
     \c_false
   \fi:
}
\def_long_test_function_new:npn {token_if_space:N} #1{
   \if:w\token_if_space_p:N #1}

Many thanks,
Will