package common import ( "os" "testing" checker "gopkg.in/check.v1" ) func TestGoodFile(t *testing.T) { goodpath := "~/goethereumtest.pass" path := ExpandHomePath(goodpath) contentstring := "3.14159265358979323846" err := WriteFile(path, []byte(contentstring)) if err != nil { t.Error("Could not write file") } if !FileExist(path) { t.Error("File not found at", path) } v, err := ReadAllFile(path) if err != nil { t.Error("Could not read file", path) } if v != contentstring { t.Error("Expected", contentstring, "Got", v) } } func TestBadFile(t *testing.T) { badpath := "/this/path/should/not/exist/goethereumtest.fail" path := ExpandHomePath(badpath) contentstring := "3.14159265358979323846" err := WriteFile(path, []byte(contentstring)) if err == nil { t.Error("Wrote file, but should not be able to", path) } if FileExist(path) { t.Error("Found file, but should not be able to", path) } v, err := ReadAllFile(path) if err == nil { t.Error("Read file, but should not be able to", v) } } type CommonSuite struct{} var _ = checker.Suite(&CommonSuite{}) func (s *CommonSuite) TestOS(c *checker.C) { expwin := (os.PathSeparator == '\\' && os.PathListSeparator == ';') res := IsWindows() if !expwin { c.Assert(res, checker.Equals, expwin, checker.Commentf("IsWindows is", res, "but path is", os.PathSeparator)) } else { c.Assert(res, checker.Not(checker.Equals), expwin, checker.Commentf("IsWindows is", res, "but path is", os.PathSeparator)) } } func (s *CommonSuite) TestWindonziePath(c *checker.C) { iswindowspath := os.PathSeparator == '\\' path := "/opt/eth/test/file.ext" res := WindonizePath(path) ressep := string(res[0]) if !iswindowspath { c.Assert(ressep, checker.Equals, "/") } else { c.Assert(ressep, checker.Not(checker.Equals), "/") } } w44/cgit/gsoc2013-evolution/'>summaryrefslogtreecommitdiffstats
path: root/ui
Commit message (Expand)AuthorAgeFilesLines
* Get the File -> Folder -> Properties menu item work again for theEttore Perazzoli2001-07-053-11/+9
* set "pixname" value only if pixbuf was loaded successfully. OtherwiseGediminas Paulauskas2001-07-052-1/+6
* Fix bug #3612: Accelerator for attach file in composer.Jacob Leach2001-07-042-0/+8
* Finish off #809 by committing the menu and right click thingies forJacob Leach2001-07-042-0/+9
* Add a seperate pixbuf for the print buttonIain Holmes2001-07-042-1/+6
* Add publish free/busy itemJP Rosevear2001-07-032-0/+11
* make the 'Task Preferences' menu item appear as the first item in theRodrigo Moya2001-07-032-3/+14
* Set it up to have an e-charset-picker bonobo-ui menu attached to the EditJeffrey Stedfast2001-07-032-74/+48
* Rename "New -> Evolution bar shortcut" into "New -> Shortcut".Ettore Perazzoli2001-07-022-1/+6
* add a separate dockitem for the search entry.Chris Toshok2001-07-022-5/+12
* Enable the label next to the "Attach" toolbar button, and get rid of theEttore Perazzoli2001-07-022-7/+6
* Implemented the `File -> New -> Shortcut' command.Ettore Perazzoli2001-07-012-1/+5
* Use Tuomas' next-message, previous-message and print icons in theEttore Perazzoli2001-07-012-3/+8
* Add the preferences thingIain Holmes2001-07-011-0/+11
* fixed typosRodrigo Moya2001-06-302-5/+9
* new fileRadek Doulik2001-06-293-0/+76
* Small typoRodrigo Moya2001-06-281-2/+1
* added cut/copy/paste entries to the main menuRodrigo Moya2001-06-282-0/+14
* added cut/copy/paste entries to the main menuRodrigo Moya2001-06-282-0/+18
* remove FIXME from FileInsertFile.Larry Ewing2001-06-282-1/+6
* Updated to use TigerT's attachment icon.Jeffrey Stedfast2001-06-282-2/+5
* Copy and Move to Folder now require the Shift key.Jeffrey Stedfast2001-06-282-2/+5
* Changed the Expunge accel to ^E instead of ^X since ^X is Cut andJeffrey Stedfast2001-06-282-7/+13
* Mail:Peter Williams2001-06-277-468/+650
* add a preview toggle itemjacob berkman2001-06-26