As a MATLAB user, I have been using coefTest to perform linear hypothesis testing. For example in $y=\beta_0+\beta_1x_1+\beta_2x_2+\beta_3x_3$, if I want to test if $\beta_1=\beta_2$, then I can simply use a linear contrast $$C=\begin{bmatrix}0&1&-1&0\end{bmatrix}.$$
Then, the test statistic will follow an $F$-distribution, whereby I can compute my $p$-value.
Does this hold for all generalized linear models? In particular, I am concerned about the general linear model (Gaussian case) and the logistic regression (binomial case).
If so, why does the test statistic, despite so many different instantiations of GLM, always follow an $F$-distribution?
It seems that many sources just take this as granted, probably because this is too basic. Yet, I need to understand why so as to get assured enough to use it. I would sincerely appreciate if someone can point me to an authoritative book.