Commits

Johan Warlander committed 6634bcd

Initial setup for running PropEr tests with rebar

  • Participants
  • Parent commits b5013c6

Comments (0)

Files changed (3)

 
 ## Testing
 
-ErlyMUD has been at least occasionally tested in the following environments,
-please do report if you get it running in a different configuration:
+Currently PropEr is being used together with the ta-qc branch of rebar for 
+testing of ErlyMUD modules. To run tests, first download / compile PropEr, 
+set it up in your Erlang environment, and then just do "./rebar qc" in the 
+top-level directory of ErlyMUD.
+
+On a more general level, ErlyMUD has been at least occasionally tested in the 
+following environments; please do report if you get it running in a different 
+configuration:
 
   * Ubuntu 10.04 (x86_64), Erlang/OTP R14B01
     * Johan Warlander <johan@snowflake.nu>

File lib/erlymud/src/em_text_prop.erl

+-module(em_text_prop).
+-include_lib("proper/include/proper.hrl").
+
+% When first char() is not a-z, string should remain the same
+prop_capitalize_non_az() ->
+  ?FORALL(S, string(),
+    ?IMPLIES(string:len(S) > 0,
+      ?IMPLIES(begin [Ch|_] = S, Ch < 'a' orelse Ch > 'z' end,
+        em_text:capitalize(S) == S))).

File rebar

File contents unchanged.