Changes in variable.c [451db9e:160d3f4]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
variable.c
r451db9e r160d3f4 351 351 " the cursor will be near the center.\n", 352 352 "normal,top,neartop,center,paged,pagedcenter" ), 353 354 OWLVAR_ENUM( "webbrowser" /* %OwlVarStub */, OWL_WEBBROWSER_NETSCAPE,355 "web browser to use to launch URLs",356 "When the 'w' key is pressed, this browser is used\n"357 "to display the requested URL.\n",358 "none,netscape,galeon,opera" ),359 353 360 354 … … 1056 1050 FAIL_UNLESS("get int 7", 9==owl_variable_get_int(&vd,"typewinsize")); 1057 1051 1058 FAIL_UNLESS("get enum", OWL_WEBBROWSER_NETSCAPE==owl_variable_get_int(&vd,"webbrowser"));1059 FAIL_UNLESS("get enum as string 1", 0==owl_variable_get_tostring(&vd,"webbrowser", buf, 1024));1060 FAIL_UNLESS("get enum as string 2", 0==strcmp(buf,"netscape"));1061 FAIL_UNLESS("set enum 1", 0==owl_variable_set_int(&vd,"webbrowser",OWL_WEBBROWSER_GALEON));1062 FAIL_UNLESS("get enum 2", OWL_WEBBROWSER_GALEON==owl_variable_get_int(&vd,"webbrowser"));1063 FAIL_UNLESS("set enum 1b", -1==owl_variable_set_int(&vd,"webbrowser",-3));1064 FAIL_UNLESS("set enum 1b", -1==owl_variable_set_int(&vd,"webbrowser",209));1065 FAIL_UNLESS("get enum 2b", OWL_WEBBROWSER_GALEON==owl_variable_get_int(&vd,"webbrowser"));1066 FAIL_UNLESS("set enum 3", 0==owl_variable_set_fromstring(&vd,"webbrowser","none",0,0));1067 FAIL_UNLESS("get enum 4", OWL_WEBBROWSER_NONE==owl_variable_get_int(&vd,"webbrowser"));1068 FAIL_UNLESS("set enum 5", 0==owl_variable_set_fromstring(&vd,"webbrowser","netscape",0,0));1069 FAIL_UNLESS("get enum 6", OWL_WEBBROWSER_NETSCAPE==owl_variable_get_int(&vd,"webbrowser"));1070 FAIL_UNLESS("set enum 7", -1==owl_variable_set_fromstring(&vd,"webbrowser","xxx",0,0));1071 FAIL_UNLESS("set enum 8", -1==owl_variable_set_fromstring(&vd,"webbrowser","",0,0));1072 FAIL_UNLESS("set enum 9", -1==owl_variable_set_fromstring(&vd,"webbrowser","netscapey",0,0));1073 FAIL_UNLESS("get enum 10", OWL_WEBBROWSER_NETSCAPE==owl_variable_get_int(&vd,"webbrowser"));1074 1075 1052 owl_variable_dict_newvar_string(&vd, "stringvar", "", "", "testval"); 1076 1053 FAIL_UNLESS("get new string var", NULL != (v = owl_variable_get(&vd, "stringvar", OWL_VARIABLE_STRING)));
Note: See TracChangeset
for help on using the changeset viewer.