As I understand it, returning 't' means "there is just one matching
completion, and the match is exact"[1], but in this case, that's not really
true: after completing "~user/" there are still more matching completions
(the contents of the user's home directory).
What you describe is for `try-completion`, not `test-completion`.
This is really just trying to match what happens when calling
'completion-file-name-table':
(completion-file-name-table "~user/" nil nil)
=> "~user/"
(try-completion "~user/" '("~user/") nil)
=> t
The `action` arg is not `lambda` is these examples.