How does a digital filter $H(z)=1/(1-z^{-1})$ change a continuous rectangular pulse?
Unless otherwise specified, your transfer function (with ROC $|z| &gt; 1$)

$$ H(z) = \frac{1}{1 - z^{-1}}$$ defines an discrete-time accumulator with impulse response;
$$h[n] = u[n]$$ and the corresponding output
$$y[n] = \sum_{k=-\infty}^{n} x[k] $$ which reduces to 
$$y[n] = \sum_{k=0}^{n} x[k] $$ for a causal input.

So practically the accumulator behaves like a continuous-time integrator and therefore for an input of square wave, you would expect a triangular wave output plus some DC term whose value depends on the initial sample timing of the square wave being applied.

Please note that this is for a AC-coupled input square wave, if the input square wave has nonzero DC component, then there will also be a ramp output term in addition to the triangular wave. However in that case you shoudl clearly indicate the time span of the input, otherwise an indefinitely long input would mean ramp output going to infinity.