To test pw.x, edit "environment_variables" in the QE directory, go to the PW/example directory, and execute
$ run_all_examples
or in one of example* directories, execute
run_example
to see how the code works.