widget_test.dart 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // This is a basic Flutter widget test.
  2. //
  3. // To perform an interaction with a widget in your test, use the WidgetTester
  4. // utility in the flutter_test package. For example, you can send tap and scroll
  5. // gestures. You can also use WidgetTester to find child widgets in the widget
  6. // tree, read text, and verify that the values of widget properties are correct.
  7. import 'package:flutter_test/flutter_test.dart';
  8. import 'package:o2oa_all_platform/common/utils/aes_util.dart';
  9. import 'package:o2oa_all_platform/common/utils/index.dart';
  10. void main() {
  11. // testWidgets('Counter increments smoke test', (WidgetTester tester) async {
  12. // // Build our app and trigger a frame.
  13. // await tester.pumpWidget(const MyApp());
  14. // // Verify that our counter starts at 0.
  15. // expect(find.text('0'), findsOneWidget);
  16. // expect(find.text('1'), findsNothing);
  17. // // Tap the '+' icon and trigger a frame.
  18. // await tester.tap(find.byIcon(Icons.add));
  19. // await tester.pump();
  20. // // Verify that our counter has incremented.
  21. // expect(find.text('0'), findsNothing);
  22. // expect(find.text('1'), findsOneWidget);
  23. // });
  24. // String password = "这是密码111111";
  25. // String encode = AESUtil().encrypt(password);
  26. // print(encode);
  27. // String decode = AESUtil().decrypt(encode);
  28. // print(decode);
  29. // expect(decode, password);
  30. String html = "尽快尽快解决空间“dddd”对对对<code>d付大夫</code>";
  31. String newHtml = HtmlUtils.contentSymbolToEscape(html);
  32. print(newHtml);
  33. String backHtml = HtmlUtils.contentEscapeBackToSymbol(newHtml);
  34. print(backHtml);
  35. }