Use constant stack space for STW under darwin.
[mono-project.git] / mono / tests / bug-459094.cs
blob28b8d6b530073cd2e297da6e7f8074723b37a8e0
1 using System;
2 using System.IO;
4 class Driver
6 static int Main ()
8 string step = "abcde12345abcde12345abcde12345abcde12345";
9 string expected = Directory.GetCurrentDirectory();
10 string current = "";
11 /*if (Directory.Exists (step)) FIXME this doesn't work on linux
12 Directory.Delete (step, true);*/
14 try {
15 for (int i = 0; i < 4000; ++i) {
16 current = Directory.GetCurrentDirectory ();
17 if (!current.Equals (expected)) {
18 Console.WriteLine ("expected dir {0} but got {1}", expected, current);
19 return 1;
21 Console.WriteLine("I={0} DIR={1}",i,Directory.GetCurrentDirectory().Length);
22 Directory.CreateDirectory (step);
23 Directory.SetCurrentDirectory (step);
24 expected += Path.DirectorySeparatorChar + step;
26 } catch (PathTooLongException) {
27 Console.WriteLine ("ok, got PathTooLongException");
28 return 0;
31 Console.WriteLine ("Max path not reached");
32 return 2;